mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-03 18:40:59 +02:00
feat(tools): enable zc* extensions for esp32p4 revision >= 3.0
This commit is contained in:
@@ -190,7 +190,12 @@ endif()
|
||||
|
||||
if(CONFIG_ESP32P4_SELECTS_REV_LESS_V3)
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
|
||||
idf_build_set_property(COMPILE_OPTIONS "-mespv-spec=2p1" APPEND)
|
||||
# 1. Set xespv2p1 explicitly to override the default xespv2p2.
|
||||
# 2. Remove zc* extensions:
|
||||
# The ESP32-P4 has always supported the zc* extensions,
|
||||
# but revisions earlier than v3.0 are affected by hardware issue DIG-661
|
||||
# and lack the mintthresh_csr register needed for the workaround.
|
||||
idf_build_set_property(COMPILE_OPTIONS "-march=rv32imafc_zicsr_zifencei_zaamo_zalrsc_xesploop_xespv2p1" APPEND)
|
||||
endif()
|
||||
elseif(CONFIG_IDF_TARGET_ESP32P4)
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang") # TODO: LLVM-478
|
||||
|
@@ -7,7 +7,9 @@ set(CMAKE_CXX_COMPILER riscv32-esp-elf-g++)
|
||||
set(CMAKE_ASM_COMPILER riscv32-esp-elf-gcc)
|
||||
set(_CMAKE_TOOLCHAIN_PREFIX riscv32-esp-elf-)
|
||||
|
||||
set(_CMAKE_TOOLCHAIN_COMMON_FLAGS "-march=rv32imafc_zicsr_zifencei_zaamo_zalrsc_xespv_xesploop -mabi=ilp32f")
|
||||
set(_CMAKE_TOOLCHAIN_COMMON_FLAGS "-march=rv32imafc_zicsr_zifencei_zaamo_zalrsc_zcb_zcmp_zcmt_xesploop_xespv \
|
||||
-mabi=ilp32f \
|
||||
-mno-cm-popret -mno-cm-push-reverse")
|
||||
|
||||
remove_duplicated_flags("${_CMAKE_TOOLCHAIN_COMMON_FLAGS} -mtune=esp-base ${CMAKE_C_FLAGS}" UNIQ_CMAKE_C_FLAGS)
|
||||
set(CMAKE_C_FLAGS "${UNIQ_CMAKE_C_FLAGS}" CACHE STRING "C Compiler Base Flags" FORCE)
|
||||
|
Reference in New Issue
Block a user