more clang update

This commit is contained in:
hathach 2024-04-17 23:08:06 +07:00
parent 5ca68ec049
commit 824e39ddeb
No known key found for this signature in database
GPG Key ID: 26FAB84F615C3C52
12 changed files with 45 additions and 29 deletions

View File

@ -4,14 +4,15 @@ if (TOOLCHAIN STREQUAL "gcc")
-mcpu=cortex-m0plus
-mfloat-abi=soft
)
set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")
elseif (TOOLCHAIN STREQUAL "clang")
message(FATAL_ERROR "Clang is not supported for this target")
elseif (TOOLCHAIN STREQUAL "iar")
set(TOOLCHAIN_COMMON_FLAGS
--cpu cortex-m0
)
set(FREERTOS_PORT IAR_ARM_CM0 CACHE INTERNAL "")
endif ()

View File

@ -4,14 +4,15 @@ if (TOOLCHAIN STREQUAL "gcc")
-mcpu=cortex-m0plus
-mfloat-abi=soft
)
set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")
elseif (TOOLCHAIN STREQUAL "clang")
message(FATAL_ERROR "Clang is not supported for this target")
elseif (TOOLCHAIN STREQUAL "iar")
set(TOOLCHAIN_COMMON_FLAGS
--cpu cortex-m0
)
set(FREERTOS_PORT IAR_ARM_CM0 CACHE INTERNAL "")
endif ()

View File

@ -4,14 +4,15 @@ if (TOOLCHAIN STREQUAL "gcc")
-mcpu=cortex-m23
-mfloat-abi=soft
)
set(FREERTOS_PORT GCC_ARM_CM23_NTZ_NONSECURE CACHE INTERNAL "")
elseif (TOOLCHAIN STREQUAL "clang")
message(FATAL_ERROR "Clang is not supported for this target")
elseif (TOOLCHAIN STREQUAL "iar")
set(TOOLCHAIN_COMMON_FLAGS
--cpu cortex-m23
)
set(FREERTOS_PORT IAR_ARM_CM23_NTZ_NONSECURE CACHE INTERNAL "")
endif ()

View File

@ -3,14 +3,15 @@ if (TOOLCHAIN STREQUAL "gcc")
-mthumb
-mcpu=cortex-m3
)
set(FREERTOS_PORT GCC_ARM_CM3 CACHE INTERNAL "")
elseif (TOOLCHAIN STREQUAL "clang")
message(FATAL_ERROR "Clang is not supported for this target")
elseif (TOOLCHAIN STREQUAL "iar")
set(TOOLCHAIN_COMMON_FLAGS
--cpu cortex-m3
)
set(FREERTOS_PORT IAR_ARM_CM3 CACHE INTERNAL "")
endif ()

View File

@ -4,14 +4,15 @@ if (TOOLCHAIN STREQUAL "gcc")
-mcpu=cortex-m33+nodsp
-mfloat-abi=soft
)
set(FREERTOS_PORT GCC_ARM_CM33_NTZ_NONSECURE CACHE INTERNAL "")
elseif (TOOLCHAIN STREQUAL "clang")
message(FATAL_ERROR "Clang is not supported for this target")
elseif (TOOLCHAIN STREQUAL "iar")
set(TOOLCHAIN_COMMON_FLAGS
--cpu cortex-m33+nodsp
)
set(FREERTOS_PORT IAR_ARM_CM33_NTZ_NONSECURE CACHE INTERNAL "")
endif ()

View File

@ -5,15 +5,16 @@ if (TOOLCHAIN STREQUAL "gcc")
-mfloat-abi=hard
-mfpu=fpv5-sp-d16
)
set(FREERTOS_PORT GCC_ARM_CM33_NTZ_NONSECURE CACHE INTERNAL "")
elseif (TOOLCHAIN STREQUAL "clang")
message(FATAL_ERROR "Clang is not supported for this target")
elseif (TOOLCHAIN STREQUAL "iar")
set(TOOLCHAIN_COMMON_FLAGS
--cpu cortex-m33
--fpu VFPv5-SP
)
set(FREERTOS_PORT IAR_ARM_CM33_NTZ_NONSECURE CACHE INTERNAL "")
endif ()

View File

@ -5,7 +5,16 @@ if (TOOLCHAIN STREQUAL "gcc")
-mfloat-abi=hard
-mfpu=fpv4-sp-d16
)
if (NOT DEFINED FREERTOS_PORT)
set(FREERTOS_PORT GCC_ARM_CM4F CACHE INTERNAL "")
endif ()
elseif (TOOLCHAIN STREQUAL "clang")
set(TOOLCHAIN_COMMON_FLAGS
--target=arm-none-eabi
-mcpu=cortex-m4
-mfpu=fpv4-sp-d16
)
if (NOT DEFINED FREERTOS_PORT)
set(FREERTOS_PORT GCC_ARM_CM4F CACHE INTERNAL "")
endif ()

View File

@ -7,6 +7,14 @@ if (TOOLCHAIN STREQUAL "gcc")
)
set(FREERTOS_PORT GCC_ARM_CM7 CACHE INTERNAL "")
elseif (TOOLCHAIN STREQUAL "clang")
set(TOOLCHAIN_COMMON_FLAGS
--target=arm-none-eabi
-mcpu=cortex-m7
-mfpu=fpv5-d16
)
set(FREERTOS_PORT GCC_ARM_CM7 CACHE INTERNAL "")
elseif (TOOLCHAIN STREQUAL "iar")
set(TOOLCHAIN_COMMON_FLAGS
--cpu cortex-m7
@ -14,12 +22,4 @@ elseif (TOOLCHAIN STREQUAL "iar")
)
set(FREERTOS_PORT IAR_ARM_CM7 CACHE INTERNAL "")
elseif (TOOLCHAIN STREQUAL "clang")
set(TOOLCHAIN_COMMON_FLAGS
--target=arm-none-eabi
-mcpu=cortex-m7
-mfpu=fpv5-d16
)
set(FREERTOS_PORT GCC_ARM_CM7 CACHE INTERNAL "")
endif ()

View File

@ -1,6 +1,9 @@
if (TOOLCHAIN STREQUAL "gcc")
set(FREERTOS_PORT GCC_MSP430F449 CACHE INTERNAL "")
elseif (TOOLCHAIN STREQUAL "clang")
message(FATAL_ERROR "Clang is not supported for this target")
elseif (TOOLCHAIN STREQUAL "iar")
set(FREERTOS_PORT IAR_MSP430 CACHE INTERNAL "")

View File

@ -23,10 +23,6 @@
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "bsp/board_api.h"
#include "tusb.h"

View File

@ -32,7 +32,10 @@ extern "C" {
#endif
#include <stdint.h>
#include <inttypes.h>
#include <stdbool.h>
#include <string.h>
#include "tusb.h"
#if CFG_TUSB_OS == OPT_OS_FREERTOS

View File

@ -67,15 +67,14 @@ function(add_board_target BOARD_TARGET)
-nostartfiles
--specs=nosys.specs --specs=nano.specs
)
elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_link_options(${BOARD_TARGET} PUBLIC
"LINKER:--script=${LD_FILE_GNU}"
)
elseif (CMAKE_C_COMPILER_ID STREQUAL "IAR")
target_link_options(${BOARD_TARGET} PUBLIC
"LINKER:--config=${LD_FILE_IAR}"
)
elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_link_options(${BOARD_TARGET} PUBLIC
#-ldummyhost
"LINKER:--script=${LD_FILE_GNU}"
)
endif ()
endif ()
endfunction()