diff options
author | Tomas Vanek <vanekt@fbl.cz> | 2022-10-01 17:10:31 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2023-01-15 14:54:50 +0000 |
commit | 59763653c631625f195bf652f226f8537fe66832 (patch) | |
tree | 5c62c682faa65548510bb8c0e5c7539a80ad11cc /src/target/target.h | |
parent | 083100fca3c5fd019517e38028d26a6c8e33a364 (diff) | |
download | riscv-openocd-59763653c631625f195bf652f226f8537fe66832.zip riscv-openocd-59763653c631625f195bf652f226f8537fe66832.tar.gz riscv-openocd-59763653c631625f195bf652f226f8537fe66832.tar.bz2 |
target/cortex_m: add SMP support for Cortex-M
Cortex-M support for SMP multicore targets.
This SMP implementation unlike older ones does not act
on the first halted target found. It polls targets
until a SMP group is finished and stores eventual
'halted' events instead of emitting them. As soon as polling
of a group is done, poll proceeds with SMP related tasks.
This approach improves detection of a reason why debug
stopped - a correct reason is detected for all targets,
not only for the first found.
Drawback: SMP target group should be defined in the same
order as the targets were defined.
Obsolete gdb 'J' packet/smp_gdb command core switching is not implemented,
use with rtos hwthread.
Only one core is resumed if debug_execution is requested.
Some ideas taken from Graham Sanderson's [4936]
and src/target/aarch64.c
Added error checking of armv7m_restore_context().
Change-Id: I60f5b79e74b624dc2b5835ff10e38ac2ccb23792
Link: [4936]: target/cortex_m: Add smp support for Cortex M | https://review.openocd.org/c/openocd/+/4936
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7239
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src/target/target.h')
-rw-r--r-- | src/target/target.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/target/target.h b/src/target/target.h index d445c29..ef9ba10 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -193,6 +193,10 @@ struct target { struct list_head *smp_targets; /* list all targets in this smp group/cluster * The head of the list is shared between the * cluster, thus here there is a pointer */ + bool smp_halt_event_postponed; /* Some SMP implementations (currently Cortex-M) stores + * 'halted' events and emits them after all targets of + * the SMP group has been polled */ + /* the gdb service is there in case of smp, we have only one gdb server * for all smp target * the target attached to the gdb is changing dynamically by changing |