1# CMake toolchain file for ULP-RISC-V 2set(CMAKE_SYSTEM_NAME Generic) 3 4set(CMAKE_C_COMPILER "riscv32-esp-elf-gcc") 5set(CMAKE_CXX_COMPILER "riscv32-esp-elf-g++") 6set(CMAKE_ASM_COMPILER "riscv32-esp-elf-gcc") 7 8set(CMAKE_C_FLAGS "-Os -march=rv32imc -mdiv -fdata-sections -ffunction-sections" 9 CACHE STRING "C Compiler Base Flags") 10set(CMAKE_CXX_FLAGS "-Os -march=rv32imc -mdiv -fdata-sections -ffunction-sections" 11 CACHE STRING "C++ Compiler Base Flags") 12set(CMAKE_ASM_FLAGS "-march=rv32imc -x assembler-with-cpp" 13 CACHE STRING "Assembler Base Flags") 14set(CMAKE_EXE_LINKER_FLAGS "-march=rv32imc --specs=nano.specs --specs=nosys.specs" 15 CACHE STRING "Linker Base Flags") 16