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 @@ -190,7 +190,12 @@ endif()
190190
191191if (CONFIG_ESP32P4_SELECTS_REV_LESS_V3)
192192 if (CMAKE_C_COMPILER_ID MATCHES "GNU" )
193- idf_build_set_property(COMPILE_OPTIONS "-mespv-spec=2p1" APPEND )
193+ # 1. Set xespv2p1 explicitly to override the default xespv2p2.
194+ # 2. Remove zc* extensions:
195+ # The ESP32-P4 has always supported the zc* extensions,
196+ # but revisions earlier than v3.0 are affected by hardware issue DIG-661
197+ # and lack the mintthresh_csr register needed for the workaround.
198+ idf_build_set_property(COMPILE_OPTIONS "-march=rv32imafc_zicsr_zifencei_zaamo_zalrsc_xesploop_xespv2p1" APPEND )
194199 endif ()
195200elseif (CONFIG_IDF_TARGET_ESP32P4)
196201 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