mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
test_app: Extend panic
app to include memprot
-related tests
- Add support for esp32s2, esp32c3 and esp32c2 for the `memprot`-related tests - Preliminary support for esp32s3 has also been added, the test app will be enabled for esp32s3 later when the memprot-related issues are fixed. - Override panic handler to dump the violation intr status - Dump the `memprot` violation registers before calling the real panic handler - Handle `Illegal Instruction` exception in case of memprot permission violation * In esp32c3 with `memprot` enabled, if we try to execute arbitrary code from RTC_FAST_MEM we get an `Illegal Instruction` exception from the panic handler rather than a `Memory Protection Fault`. * This is because the Illegal Instruction interrupt occurs earlier than the memory protection interrupt due to a higher interrupt latency.
This commit is contained in:
12
tools/test_apps/system/panic/sdkconfig.ci.memprot_esp32s2
Normal file
12
tools/test_apps/system/panic/sdkconfig.ci.memprot_esp32s2
Normal file
@@ -0,0 +1,12 @@
|
||||
# Restricting to ESP32S2
|
||||
CONFIG_IDF_TARGET="esp32s2"
|
||||
|
||||
# Enabling memory protection
|
||||
CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=y
|
||||
CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=y
|
||||
|
||||
# Enabling DCACHE
|
||||
CONFIG_ESP32S2_DATA_CACHE_8KB=y
|
||||
|
||||
# Enable memprot test
|
||||
CONFIG_TEST_MEMPROT=y
|
Reference in New Issue
Block a user