2022-12-04 08:55:47 +00:00
|
|
|
set(CMAKE_SYSTEM_NAME Generic)
|
|
|
|
|
2022-12-24 00:30:12 +00:00
|
|
|
if (UNIX)
|
|
|
|
set(TOOLCHAIN_PREFIX riscv32-unknown-linux-gnu-)
|
|
|
|
endif()
|
|
|
|
if (WIN32)
|
|
|
|
set(TOOLCHAIN_PREFIX riscv-none-elf-)
|
|
|
|
endif()
|
2022-12-04 08:55:47 +00:00
|
|
|
|
|
|
|
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
|
|
|
|
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)
|
2022-12-24 00:30:12 +00:00
|
|
|
set(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy)
|
|
|
|
set(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump)
|