diff options
author | Oxore <oxore@protonmail.com> | 2022-10-09 02:54:07 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2022-10-09 02:57:01 +0300 |
commit | b1c8bb5df090d65cdd37a7acafb5dee8e3c530c6 (patch) | |
tree | 04e77389b96ed575bff7810ebb71857eff7e3b46 /toolchain-gcc-newlib-arm-none-eabi-cm0.cmake | |
parent | 59651845feac3c6a2cb8e91e7494fd0e7940d145 (diff) |
Add CMakeLists.txt and make it compile with GCC
Diffstat (limited to 'toolchain-gcc-newlib-arm-none-eabi-cm0.cmake')
-rw-r--r-- | toolchain-gcc-newlib-arm-none-eabi-cm0.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/toolchain-gcc-newlib-arm-none-eabi-cm0.cmake b/toolchain-gcc-newlib-arm-none-eabi-cm0.cmake new file mode 100644 index 0000000..36b0405 --- /dev/null +++ b/toolchain-gcc-newlib-arm-none-eabi-cm0.cmake @@ -0,0 +1,15 @@ +set(CMAKE_SYSTEM_NAME Generic) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR ARM) +set(CMAKE_C_COMPILER_WORKS 1) # mitigate missing `_exit` +set(CMAKE_CXX_COMPILER_WORKS 1) # mitigate missing `_exit` +set(TOOLCHAIN_NAME "gcc-newlib") +set(CMAKE_C_COMPILER "arm-none-eabi-gcc") +set(CMAKE_ASM_COMPILER "arm-none-eabi-gcc") +set(CMAKE_CXX_COMPILER "arm-none-eabi-g++") +set(CMAKE_LINKER "arm-none-eabi-gcc") +set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_LINKER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>") +set(CMAKE_OBJCOPY "arm-none-eabi-objcopy") +set(CMAKE_OBJSIZE "arm-none-eabi-size") +set(cpu_options -mthumb -mcpu=cortex-m0 -msoft-float) +add_compile_definitions("__FREERTOS__") |