summaryrefslogtreecommitdiff
path: root/tools/cmake/cpu
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-05-19 14:46:39 +0700
committerhathach <[email protected]>2023-05-19 14:46:39 +0700
commite8dd200fed6adeebd98ebc7abf09d45285da7abf (patch)
tree755ac5331dc325dc6b8298c9cac4c92e3877f6f6 /tools/cmake/cpu
parent6ecd4800061ac72421bf3e33468ee670c2d9ae55 (diff)
move cmake folder to tools/
Diffstat (limited to 'tools/cmake/cpu')
-rw-r--r--tools/cmake/cpu/cortex-m33.cmake12
-rw-r--r--tools/cmake/cpu/cortex-m4.cmake12
-rw-r--r--tools/cmake/cpu/cortex-m7.cmake12
3 files changed, 36 insertions, 0 deletions
diff --git a/tools/cmake/cpu/cortex-m33.cmake b/tools/cmake/cpu/cortex-m33.cmake
new file mode 100644
index 000000000..fbd5027b1
--- /dev/null
+++ b/tools/cmake/cpu/cortex-m33.cmake
@@ -0,0 +1,12 @@
+if (TOOLCHAIN STREQUAL "gcc")
+ list(APPEND TOOLCHAIN_COMMON_FLAGS
+ -mthumb
+ -mcpu=cortex-m33
+ -mfloat-abi=hard
+ -mfpu=fpv5-d16
+ )
+
+ set(FREERTOS_PORT GCC_ARM_CM33_NONSECURE CACHE INTERNAL "")
+else ()
+ # TODO support IAR
+endif ()
diff --git a/tools/cmake/cpu/cortex-m4.cmake b/tools/cmake/cpu/cortex-m4.cmake
new file mode 100644
index 000000000..5a2d16c05
--- /dev/null
+++ b/tools/cmake/cpu/cortex-m4.cmake
@@ -0,0 +1,12 @@
+if (TOOLCHAIN STREQUAL "gcc")
+ list(APPEND TOOLCHAIN_COMMON_FLAGS
+ -mthumb
+ -mcpu=cortex-m4
+ -mfloat-abi=hard
+ -mfpu=fpv4-sp-d16
+ )
+
+ set(FREERTOS_PORT GCC_ARM_CM4F CACHE INTERNAL "")
+else ()
+ # TODO support IAR
+endif ()
diff --git a/tools/cmake/cpu/cortex-m7.cmake b/tools/cmake/cpu/cortex-m7.cmake
new file mode 100644
index 000000000..481c86bc5
--- /dev/null
+++ b/tools/cmake/cpu/cortex-m7.cmake
@@ -0,0 +1,12 @@
+if (TOOLCHAIN STREQUAL "gcc")
+ list(APPEND TOOLCHAIN_COMMON_FLAGS
+ -mthumb
+ -mcpu=cortex-m7
+ -mfloat-abi=hard
+ -mfpu=fpv5-d16
+ )
+
+ set(FREERTOS_PORT GCC_ARM_CM7 CACHE INTERNAL "")
+else ()
+ # TODO support IAR
+endif ()