mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 21:54:33 +02:00
esp32c3: Do not enable memory protection under debugger
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
#include "esp32c3/rom/ets_sys.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
#include "soc/cpu.h"
|
||||
|
||||
extern int _iram_text_end;
|
||||
static const char *TAG = "memprot";
|
||||
|
||||
@@ -532,6 +534,11 @@ void esp_memprot_set_prot_int(bool invoke_panic_handler, bool lock_feature, void
|
||||
esp_memprot_set_monitor_en(MEMPROT_DRAM0_SRAM, false);
|
||||
}
|
||||
|
||||
// do not enable if being debugged
|
||||
if (esp_cpu_in_ocd_debug_mode()) {
|
||||
return;
|
||||
}
|
||||
|
||||
//panic handling
|
||||
if (invoke_panic_handler) {
|
||||
if (use_iram0) {
|
||||
|
Reference in New Issue
Block a user