From a274aa862be3bf1479a178bb691161c2e438ef16 Mon Sep 17 00:00:00 2001 From: Doug Brown Date: Sun, 6 Aug 2023 20:35:28 -0700 Subject: [PATCH] Add cmake toolchain file for M258KE build --- toolchain-m258ke.cmake | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 toolchain-m258ke.cmake diff --git a/toolchain-m258ke.cmake b/toolchain-m258ke.cmake new file mode 100644 index 0000000..3345190 --- /dev/null +++ b/toolchain-m258ke.cmake @@ -0,0 +1,16 @@ +# This will tell CMake that we are cross compiling +set(CMAKE_SYSTEM_NAME Generic) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR arm) +set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) + +# Make sure it knows what binaries to use +set(CMAKE_AR arm-none-eabi-ar) +set(CMAKE_ASM_COMPILER arm-none-eabi-gcc) +set(CMAKE_C_COMPILER arm-none-eabi-gcc) +set(CMAKE_CXX_COMPILER arm-none-eabi-g++) +set(CMAKE_LINKER arm-none-eabi-ld) +set(CMAKE_OBJCOPY arm-none-eabi-objcopy) +set(CMAKE_RANLIB arm-none-eabi-ranlib) +set(CMAKE_SIZE arm-none-eabi-size) +set(CMAKE_STRIP arm-none-eabi-strip)