summaryrefslogtreecommitdiff
path: root/examples/build_system/cmake/cpu/cortex-m0plus.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'examples/build_system/cmake/cpu/cortex-m0plus.cmake')
-rw-r--r--examples/build_system/cmake/cpu/cortex-m0plus.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/build_system/cmake/cpu/cortex-m0plus.cmake b/examples/build_system/cmake/cpu/cortex-m0plus.cmake
new file mode 100644
index 000000000..ddf0f16af
--- /dev/null
+++ b/examples/build_system/cmake/cpu/cortex-m0plus.cmake
@@ -0,0 +1,22 @@
+if (TOOLCHAIN STREQUAL "gcc")
+ set(TOOLCHAIN_COMMON_FLAGS
+ -mthumb
+ -mcpu=cortex-m0plus
+ -mfloat-abi=soft
+ )
+ set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")
+
+elseif (TOOLCHAIN STREQUAL "clang")
+ 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
+ --cpu cortex-m0
+ )
+ set(FREERTOS_PORT IAR_ARM_CM0 CACHE INTERNAL "")
+
+endif ()