2023-02-22 15:30:09 -05:00
|
|
|
include($ENV{IDF_PATH}/tools/cmake/utilities.cmake)
|
|
|
|
|
|
|
|
set(CMAKE_SYSTEM_NAME Generic)
|
|
|
|
|
|
|
|
set(CMAKE_C_COMPILER clang)
|
|
|
|
set(CMAKE_CXX_COMPILER clang++)
|
|
|
|
set(CMAKE_ASM_COMPILER clang)
|
2024-04-11 08:31:06 -04:00
|
|
|
set(CMAKE_LINKER riscv32-esp-elf-clang-ld)
|
2023-02-22 15:30:09 -05:00
|
|
|
|
|
|
|
set(CMAKE_AR llvm-ar)
|
|
|
|
set(CMAKE_RANLIB llvm-ranlib)
|
2024-04-11 08:31:06 -04:00
|
|
|
set(CMAKE_OBJDUMP riscv32-esp-elf-clang-objdump)
|
2023-02-22 15:30:09 -05:00
|
|
|
|
2024-05-14 13:40:33 -04:00
|
|
|
remove_duplicated_flags("--target=riscv32-esp-elf -march=rv32imc_zicsr_zifencei -mabi=ilp32 \
|
2023-02-22 15:30:09 -05:00
|
|
|
${CMAKE_C_FLAGS}"
|
|
|
|
UNIQ_CMAKE_C_FLAGS)
|
|
|
|
set(CMAKE_C_FLAGS "${UNIQ_CMAKE_C_FLAGS}"
|
|
|
|
CACHE STRING "C Compiler Base Flags"
|
|
|
|
FORCE)
|
|
|
|
|
2024-05-14 13:40:33 -04:00
|
|
|
remove_duplicated_flags("--target=riscv32-esp-elf -march=rv32imc_zicsr_zifencei -mabi=ilp32 \
|
2023-02-22 15:30:09 -05:00
|
|
|
${CMAKE_CXX_FLAGS}"
|
|
|
|
UNIQ_CMAKE_CXX_FLAGS)
|
|
|
|
set(CMAKE_CXX_FLAGS "${UNIQ_CMAKE_CXX_FLAGS}"
|
|
|
|
CACHE STRING "C++ Compiler Base Flags"
|
|
|
|
FORCE)
|
|
|
|
|
2024-05-14 13:40:33 -04:00
|
|
|
remove_duplicated_flags("--target=riscv32-esp-elf -march=rv32imc_zicsr_zifencei -mabi=ilp32 \
|
2023-02-22 15:30:09 -05:00
|
|
|
${CMAKE_ASM_FLAGS}"
|
|
|
|
UNIQ_CMAKE_ASM_FLAGS)
|
|
|
|
set(CMAKE_ASM_FLAGS "${UNIQ_CMAKE_ASM_FLAGS}"
|
|
|
|
CACHE STRING "Assembler Base Flags"
|
|
|
|
FORCE)
|
2024-04-11 08:31:06 -04:00
|
|
|
|
|
|
|
remove_duplicated_flags("--ld-path=riscv32-esp-elf-clang-ld -z noexecstack \
|
|
|
|
${CMAKE_EXE_LINKER_FLAGS}"
|
|
|
|
UNIQ_CMAKE_EXE_LINKER_FLAGS)
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${UNIQ_CMAKE_EXE_LINKER_FLAGS}"
|
|
|
|
CACHE STRING "Linker Base Flags"
|
|
|
|
FORCE)
|