From 912cee03a4b302ce66ebfc64c4f586152ff8918d Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 22 Dec 2020 20:21:11 +1100 Subject: [PATCH] cmake: Add esp32c3 toolchain file --- tools/cmake/toolchain-esp32c3.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tools/cmake/toolchain-esp32c3.cmake diff --git a/tools/cmake/toolchain-esp32c3.cmake b/tools/cmake/toolchain-esp32c3.cmake new file mode 100644 index 0000000000..cd30a2ae04 --- /dev/null +++ b/tools/cmake/toolchain-esp32c3.cmake @@ -0,0 +1,9 @@ +set(CMAKE_SYSTEM_NAME Generic) + +set(CMAKE_C_COMPILER riscv32-esp-elf-gcc) +set(CMAKE_CXX_COMPILER riscv32-esp-elf-g++) +set(CMAKE_ASM_COMPILER riscv32-esp-elf-gcc) + +set(CMAKE_C_FLAGS "-march=rv32imc" CACHE STRING "C Compiler Base Flags") +set(CMAKE_CXX_FLAGS "-march=rv32imc" CACHE STRING "C++ Compiler Base Flags") +set(CMAKE_EXE_LINKER_FLAGS "-nostartfiles -march=rv32imc --specs=nosys.specs" CACHE STRING "Linker Base Flags")