summaryrefslogtreecommitdiff
path: root/tools/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'tools/cmake')
-rw-r--r--tools/cmake/cpu/cortex-m0.cmake17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/cmake/cpu/cortex-m0.cmake b/tools/cmake/cpu/cortex-m0.cmake
new file mode 100644
index 000000000..bc2257048
--- /dev/null
+++ b/tools/cmake/cpu/cortex-m0.cmake
@@ -0,0 +1,17 @@
+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 "iar")
+ set(TOOLCHAIN_COMMON_FLAGS
+ --cpu cortex-m0
+ )
+
+ set(FREERTOS_PORT IAR_ARM_CM0 CACHE INTERNAL "")
+
+endif ()