2022-01-06 03:17:29 +00:00
|
|
|
include($ENV{IDF_PATH}/tools/cmake/utilities.cmake)
|
|
|
|
|
2020-12-22 09:21:11 +00:00
|
|
|
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)
|
2022-01-20 07:45:13 +00:00
|
|
|
set(_CMAKE_TOOLCHAIN_PREFIX riscv32-esp-elf-)
|
2020-12-22 09:21:11 +00:00
|
|
|
|
2023-02-06 04:59:02 +00:00
|
|
|
remove_duplicated_flags("-march=rv32imc_zicsr_zifencei ${CMAKE_C_FLAGS}"
|
2022-01-06 03:17:29 +00:00
|
|
|
UNIQ_CMAKE_C_FLAGS)
|
|
|
|
set(CMAKE_C_FLAGS "${UNIQ_CMAKE_C_FLAGS}" CACHE STRING "C Compiler Base Flags" FORCE)
|
2023-02-06 04:59:02 +00:00
|
|
|
remove_duplicated_flags("-march=rv32imc_zicsr_zifencei ${CMAKE_CXX_FLAGS}"
|
2022-01-06 03:17:29 +00:00
|
|
|
UNIQ_CMAKE_CXX_FLAGS)
|
|
|
|
set(CMAKE_CXX_FLAGS "${UNIQ_CMAKE_CXX_FLAGS}" CACHE STRING "C++ Compiler Base Flags" FORCE)
|
2021-09-29 10:46:35 +00:00
|
|
|
|
2023-02-06 04:59:02 +00:00
|
|
|
remove_duplicated_flags("-nostartfiles -march=rv32imc_zicsr_zifencei --specs=nosys.specs \
|
2022-01-06 03:17:29 +00:00
|
|
|
${CMAKE_EXE_LINKER_FLAGS}"
|
|
|
|
UNIQ_CMAKE_SAFE_EXE_LINKER_FLAGS)
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${UNIQ_CMAKE_SAFE_EXE_LINKER_FLAGS}" CACHE STRING "Linker Base Flags" FORCE)
|