summaryrefslogtreecommitdiff
path: root/examples/build_system/cmake
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2024-04-28 00:29:19 +0200
committerHiFiPhile <[email protected]>2024-04-28 00:29:19 +0200
commitbc8c8df3163bd41d0220746618f6495425344028 (patch)
tree703b303a45d20082ef5020150238590709f76b2e /examples/build_system/cmake
parenta29a3af218e24034af4406eeb7c7f660555d322b (diff)
Build STM32F7 with single-point FPU.
Diffstat (limited to 'examples/build_system/cmake')
-rw-r--r--examples/build_system/cmake/cpu/cortex-m7-fpsp.cmake25
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/build_system/cmake/cpu/cortex-m7-fpsp.cmake b/examples/build_system/cmake/cpu/cortex-m7-fpsp.cmake
new file mode 100644
index 000000000..b10f00fc2
--- /dev/null
+++ b/examples/build_system/cmake/cpu/cortex-m7-fpsp.cmake
@@ -0,0 +1,25 @@
+if (TOOLCHAIN STREQUAL "gcc")
+ set(TOOLCHAIN_COMMON_FLAGS
+ -mthumb
+ -mcpu=cortex-m7
+ -mfloat-abi=hard
+ -mfpu=fpv5-sp-d16
+ )
+ set(FREERTOS_PORT GCC_ARM_CM7 CACHE INTERNAL "")
+
+elseif (TOOLCHAIN STREQUAL "clang")
+ set(TOOLCHAIN_COMMON_FLAGS
+ --target=arm-none-eabi
+ -mcpu=cortex-m7
+ -mfpu=fpv5-sp-d16
+ )
+ set(FREERTOS_PORT GCC_ARM_CM7 CACHE INTERNAL "")
+
+elseif (TOOLCHAIN STREQUAL "iar")
+ set(TOOLCHAIN_COMMON_FLAGS
+ --cpu cortex-m7
+ --fpu VFPv5_sp
+ )
+ set(FREERTOS_PORT IAR_ARM_CM7 CACHE INTERNAL "")
+
+endif ()