2020-04-17 19:34:56 +00:00
|
|
|
# CMake toolchain file for ULP-RISC-V
|
|
|
|
set(CMAKE_SYSTEM_NAME Generic)
|
|
|
|
|
2020-12-15 17:24:07 +00:00
|
|
|
set(CMAKE_C_COMPILER "riscv32-esp-elf-gcc")
|
|
|
|
set(CMAKE_CXX_COMPILER "riscv32-esp-elf-g++")
|
|
|
|
set(CMAKE_ASM_COMPILER "riscv32-esp-elf-gcc")
|
|
|
|
|
2023-02-06 04:59:02 +00:00
|
|
|
set(CMAKE_C_FLAGS "-Os -march=rv32imc_zicsr_zifencei -mdiv -fdata-sections -ffunction-sections"
|
2020-12-15 17:24:07 +00:00
|
|
|
CACHE STRING "C Compiler Base Flags")
|
2023-02-06 04:59:02 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "-Os -march=rv32imc_zicsr_zifencei -mdiv -fdata-sections -ffunction-sections"
|
2020-12-15 17:24:07 +00:00
|
|
|
CACHE STRING "C++ Compiler Base Flags")
|
|
|
|
set(CMAKE_ASM_FLAGS "-march=rv32imc -x assembler-with-cpp"
|
|
|
|
CACHE STRING "Assembler Base Flags")
|
2023-02-06 04:59:02 +00:00
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "-march=rv32imc_zicsr_zifencei --specs=nano.specs --specs=nosys.specs"
|
2020-12-15 17:24:07 +00:00
|
|
|
CACHE STRING "Linker Base Flags")
|