summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-06-24 21:33:46 +0700
committerhathach <[email protected]>2023-06-24 21:47:55 +0700
commit2a96ef2519d566c654907df0e1198088510774fe (patch)
treec7af41d6c42c3ec154df552fb946f81824ef5c79 /tools
parent946d3fdd4f0b5dc1e5a3cadde25691d6f34e30dc (diff)
add cmake for f0, f1
Diffstat (limited to 'tools')
-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 ()