Fire_HPM6750_Template/riscv32-elf.cmake

18 lines
588 B
CMake

# Poor old Windows...
if(WIN32)
set(CMAKE_SYSTEM_NAME "Generic")
endif()
set(CMAKE_C_COMPILER riscv32-elf-gcc)
set(CMAKE_CXX_COMPILER riscv32-elf-g++)
# Optionally set size binary name, for elf section size reporting.
set(TARGET_TOOLCHAIN_SIZE riscv32-elf-size)
set(CMAKE_C_FLAGS_INIT "-march=rv32imafdcxandes -mabi=ilp32d")
set(CMAKE_CXX_FLAGS_INIT "-march=rv32imafdcxandes -mabi=ilp32d")
set(CMAKE_EXE_LINKER_FLAGS_INIT "-specs=nosys.specs -Wl,--print-memory-usage -nostartfiles")
# Make CMake happy about those compilers
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")