change(esp_tee): disable zcmp extension for esp_tee builds

This commit is contained in:
Alexey Lapshin
2025-09-24 21:29:15 +07:00
parent fab0bb1056
commit dfac1a162c
2 changed files with 22 additions and 1 deletions

View File

@@ -15,7 +15,6 @@ endif()
if(BOOTLOADER_BUILD)
idf_component_register()
return()
elseif(esp_tee_build)
# TEE build currently only uses the shared headers.
idf_component_register(INCLUDE_DIRS include)
@@ -86,6 +85,20 @@ else()
endif()
endif()
# TODO: IDF-14145
if((CONFIG_SECURE_ENABLE_TEE OR esp_tee_build) AND CMAKE_C_COMPILER_ID MATCHES "GNU")
if(CONFIG_IDF_TARGET_ESP32C5 OR CONFIG_IDF_TARGET_ESP32C61)
# Disable zcmp extension to avoid hardware issue with interrupts (DIG-661)
set(march_option "-march=rv32imac_zicsr_zifencei_zaamo_zalrsc")
idf_build_set_property(COMPILE_OPTIONS "${march_option}" APPEND)
idf_build_set_property(LINK_OPTIONS "${march_option}" APPEND)
endif()
endif()
if(BOOTLOADER_BUILD)
return()
endif()
set(secure_service_yml
${COMPONENT_DIR}/scripts/${IDF_TARGET}/sec_srv_tbl_default.yml ${custom_secure_service_yaml}
)

View File

@@ -7,3 +7,11 @@ idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS ""
PRIV_REQUIRES pms_and_cpu_intr esp_psram
WHOLE_ARCHIVE)
# TODO: IDF-14145
if(CONFIG_IDF_TARGET_ESP32C5 OR CONFIG_IDF_TARGET_ESP32C61)
# Disable zcmp extension to avoid hardware issue with interrupts (DIG-661)
set(march_option "-march=rv32imac_zicsr_zifencei_zaamo_zalrsc")
idf_build_set_property(COMPILE_OPTIONS "${march_option}" APPEND)
idf_build_set_property(LINK_OPTIONS "${march_option}" APPEND)
endif()