forked from auracaster/openocd
target/espressif: read entry addresses of pre-defined stub functions
Debug stubs functionality provided by ESP IDF allows executing target function in any address. e.g; esp32_cmd_gcov() Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I56d844e5a862c9bf33fdb991b01abb7a76047ca7 Reviewed-on: https://review.openocd.org/c/openocd/+/7758 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
29b02402ff
commit
9fd754ca4d
@@ -146,6 +146,7 @@ int esp_xtensa_smp_poll(struct target *target)
|
||||
enum target_state old_state = target->state;
|
||||
struct esp_xtensa_smp_common *esp_xtensa_smp = target_to_esp_xtensa_smp(target);
|
||||
struct esp_xtensa_common *esp_xtensa = target_to_esp_xtensa(target);
|
||||
uint32_t old_dbg_stubs_base = esp_xtensa->esp.dbg_stubs.base;
|
||||
struct target_list *head;
|
||||
struct target *curr;
|
||||
bool other_core_resume_req = false;
|
||||
@@ -163,6 +164,16 @@ int esp_xtensa_smp_poll(struct target *target)
|
||||
if (ret != ERROR_OK)
|
||||
return ret;
|
||||
|
||||
if (esp_xtensa->esp.dbg_stubs.base && old_dbg_stubs_base != esp_xtensa->esp.dbg_stubs.base) {
|
||||
/* debug stubs base is set only in PRO-CPU TRAX register, so sync this info */
|
||||
foreach_smp_target(head, target->smp_targets) {
|
||||
curr = head->target;
|
||||
if (curr == target)
|
||||
continue;
|
||||
target_to_esp_xtensa(curr)->esp.dbg_stubs.base = esp_xtensa->esp.dbg_stubs.base;
|
||||
}
|
||||
}
|
||||
|
||||
if (target->smp) {
|
||||
if (target->state == TARGET_RESET) {
|
||||
esp_xtensa_smp->examine_other_cores = ESP_XTENSA_SMP_EXAMINE_OTHER_CORES;
|
||||
|
||||
Reference in New Issue
Block a user