summaryrefslogtreecommitdiff
path: root/examples/build_system
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-04-19 14:13:48 +0700
committerhathach <[email protected]>2024-04-19 23:17:02 +0700
commitd157abe77c03c2d058c79585e4700fc1d1d06f9f (patch)
treea72b2d87883d261d4a530b7e57589e22ff1e435c /examples/build_system
parent4a183d2e3fd0acb54002fa22dc1dc9be5c1a23f4 (diff)
clang samd21 build but has issue as samd51
Diffstat (limited to 'examples/build_system')
-rw-r--r--examples/build_system/cmake/cpu/cortex-m0.cmake2
-rw-r--r--examples/build_system/cmake/cpu/cortex-m0plus.cmake6
2 files changed, 6 insertions, 2 deletions
diff --git a/examples/build_system/cmake/cpu/cortex-m0.cmake b/examples/build_system/cmake/cpu/cortex-m0.cmake
index ddf0f16af..62019d90d 100644
--- a/examples/build_system/cmake/cpu/cortex-m0.cmake
+++ b/examples/build_system/cmake/cpu/cortex-m0.cmake
@@ -9,7 +9,7 @@ if (TOOLCHAIN STREQUAL "gcc")
elseif (TOOLCHAIN STREQUAL "clang")
set(TOOLCHAIN_COMMON_FLAGS
--target=arm-none-eabi
- -mcpu=cortex-m0plus
+ -mcpu=cortex-m0
)
set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")
diff --git a/examples/build_system/cmake/cpu/cortex-m0plus.cmake b/examples/build_system/cmake/cpu/cortex-m0plus.cmake
index 2438ca96a..ddf0f16af 100644
--- a/examples/build_system/cmake/cpu/cortex-m0plus.cmake
+++ b/examples/build_system/cmake/cpu/cortex-m0plus.cmake
@@ -7,7 +7,11 @@ if (TOOLCHAIN STREQUAL "gcc")
set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")
elseif (TOOLCHAIN STREQUAL "clang")
- message(FATAL_ERROR "Clang is not supported for this target")
+ set(TOOLCHAIN_COMMON_FLAGS
+ --target=arm-none-eabi
+ -mcpu=cortex-m0plus
+ )
+ set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")
elseif (TOOLCHAIN STREQUAL "iar")
set(TOOLCHAIN_COMMON_FLAGS