feat(esp32h4): add assist_debug stack monitoring support

This commit is contained in:
Erhan Kurubas
2026-03-19 11:40:44 +08:00
committed by BOT
parent 18a583e517
commit 4a7d67df84
18 changed files with 273 additions and 35 deletions
+5 -2
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -8,6 +8,7 @@
#include "esp_private/periph_ctrl.h"
#include "esp_private/startup_internal.h"
#include "soc/soc_caps.h"
#include "soc/system_intr.h"
#include "esp_rom_sys.h"
#include "esp_cpu.h"
@@ -21,10 +22,12 @@ ESP_SYSTEM_INIT_FN(esp_hw_stack_guard_init, SECONDARY, ESP_SYSTEM_INIT_ALL_CORES
PERIPH_RCC_ATOMIC()
#endif
{
assist_debug_ll_enable_bus_clock(true);
assist_debug_ll_enable_bus_clock(core_id, true);
assist_debug_ll_reset_register(core_id);
}
assist_debug_ll_enable_pc_recording(core_id, true);
/* set interrupt to matrix */
esp_rom_route_intr_matrix(core_id, ETS_ASSIST_DEBUG_INTR_SOURCE, ETS_ASSIST_DEBUG_INUM);
esprv_int_set_type(ETS_ASSIST_DEBUG_INUM, INTR_TYPE_LEVEL);