mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-03 00:21:44 +01:00
tools: use riscv32-esp-elf toolchain for ESP32-S2 RISC-V ULP
riscv32-esp-elf toolchain (used for ESP32-C3) can also be used for ESP32-S2 RISC-V ULP coprocessor. This removes the riscv-none-embed-gcc toolchain which was originally used for the ULP, and updates the docs and CMake files to use riscv32-esp-elf. Some flags are cleaned up and workarounds removed from CMake toolchain file.
This commit is contained in:
@@ -1,18 +1,15 @@
|
||||
# CMake toolchain file for ULP-RISC-V
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
|
||||
# Not best solution, needs to figure why the compiler detection
|
||||
# fails in CI
|
||||
set(CMAKE_C_COMPILER_FORCED TRUE)
|
||||
set(CMAKE_CXX_COMPILER_FORCED TRUE)
|
||||
set(CMAKE_C_COMPILER "riscv32-esp-elf-gcc")
|
||||
set(CMAKE_CXX_COMPILER "riscv32-esp-elf-g++")
|
||||
set(CMAKE_ASM_COMPILER "riscv32-esp-elf-gcc")
|
||||
|
||||
set(CMAKE_C_COMPILER "riscv-none-embed-gcc")
|
||||
set(CMAKE_ASM_COMPILER "riscv-none-embed-gcc")
|
||||
|
||||
if(NOT ASM_DIALECT)
|
||||
set(ASM_DIALECT "")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS "-Os -march=rv32imc -mdiv -fdata-sections -ffunction-sections")
|
||||
set(CMAKE_ASM_FLAGS "-march=rv32imc -mdiv -x assembler-with-cpp -fdata-sections -ffunction-sections")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-march=rv32imc --specs=nano.specs --specs=nosys.specs")
|
||||
set(CMAKE_C_FLAGS "-Os -march=rv32imc -mdiv -fdata-sections -ffunction-sections"
|
||||
CACHE STRING "C Compiler Base Flags")
|
||||
set(CMAKE_CXX_FLAGS "-Os -march=rv32imc -mdiv -fdata-sections -ffunction-sections"
|
||||
CACHE STRING "C++ Compiler Base Flags")
|
||||
set(CMAKE_ASM_FLAGS "-march=rv32imc -x assembler-with-cpp"
|
||||
CACHE STRING "Assembler Base Flags")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-march=rv32imc --specs=nano.specs --specs=nosys.specs"
|
||||
CACHE STRING "Linker Base Flags")
|
||||
|
||||
Reference in New Issue
Block a user