File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
components/esp_hw_support Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,12 @@ endif()
193193
194194if (CONFIG_ESP32P4_SELECTS_REV_LESS_V3)
195195 if (CMAKE_C_COMPILER_ID MATCHES "GNU" )
196- idf_build_set_property(COMPILE_OPTIONS "-mespv-spec=2p1" APPEND )
196+ # 1. Set xespv2p1 explicitly to override the default xespv2p2.
197+ # 2. Remove zc* extensions:
198+ # The ESP32-P4 has always supported the zc* extensions,
199+ # but revisions earlier than v3.0 are affected by hardware issue DIG-661
200+ # and lack the mintthresh_csr register needed for the workaround.
201+ idf_build_set_property(COMPILE_OPTIONS "-march=rv32imafc_zicsr_zifencei_zaamo_zalrsc_xesploop_xespv2p1" APPEND )
197202 endif ()
198203elseif (CONFIG_IDF_TARGET_ESP32P4)
199204 if (CMAKE_C_COMPILER_ID MATCHES "Clang" ) # TODO: LLVM-478
Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ set(CMAKE_CXX_COMPILER riscv32-esp-elf-g++)
77set (CMAKE_ASM_COMPILER riscv32-esp-elf-gcc)
88set (_CMAKE_TOOLCHAIN_PREFIX riscv32-esp-elf-)
99
10- set (_CMAKE_TOOLCHAIN_COMMON_FLAGS "-march=rv32imafc_zicsr_zifencei_zaamo_zalrsc_xespv_xesploop -mabi=ilp32f" )
10+ set (_CMAKE_TOOLCHAIN_COMMON_FLAGS "-march=rv32imafc_zicsr_zifencei_zaamo_zalrsc_zcb_zcmp_zcmt_xesploop_xespv \
11+ -mabi=ilp32f \
12+ -mno-cm-popret -mno-cm-push-reverse" )
1113
1214remove_duplicated_flags("${_CMAKE_TOOLCHAIN_COMMON_FLAGS} -mtune=esp-base ${CMAKE_C_FLAGS} " UNIQ_CMAKE_C_FLAGS)
1315set (CMAKE_C_FLAGS "${UNIQ_CMAKE_C_FLAGS} " CACHE STRING "C Compiler Base Flags" FORCE)
You can’t perform that action at this time.
0 commit comments