update cmake to build with IAR for g0 and g4

This commit is contained in:
hathach
2023-06-02 15:26:16 +07:00
parent fcf7791454
commit bb795e6a5e
20 changed files with 415 additions and 311 deletions

View File

@@ -1,10 +1,16 @@
if (TOOLCHAIN STREQUAL "gcc")
list(APPEND TOOLCHAIN_COMMON_FLAGS
set(TOOLCHAIN_COMMON_FLAGS
-mthumb
-mcpu=cortex-m3
)
set(FREERTOS_PORT GCC_ARM_CM3 CACHE INTERNAL "")
else ()
# TODO support IAR
elseif (TOOLCHAIN STREQUAL "iar")
set(TOOLCHAIN_COMMON_FLAGS
--cpu cortex-m3
)
set(FREERTOS_PORT IAR_ARM_CM3 CACHE INTERNAL "")
endif ()