aboutsummaryrefslogtreecommitdiff
path: root/tcl/target
diff options
context:
space:
mode:
authorTomas Vanek <vanekt@fbl.cz>2022-10-02 14:46:11 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2023-01-15 14:55:45 +0000
commit8af4d4462fb1954ab4f5d97bc0513e3082a6bb52 (patch)
tree252fe145fec7ab5c3a3b1b87ad9e46ba55498f25 /tcl/target
parent0979cbc5bcf0688d10815aaa1b938a6086e75f0e (diff)
downloadriscv-openocd-8af4d4462fb1954ab4f5d97bc0513e3082a6bb52.zip
riscv-openocd-8af4d4462fb1954ab4f5d97bc0513e3082a6bb52.tar.gz
riscv-openocd-8af4d4462fb1954ab4f5d97bc0513e3082a6bb52.tar.bz2
tcl/target: add SMP mode to rp2040.cfg
Add the variable selected configuration for SMP debug with rtos hwthread. Use SMP by default. Change-Id: I1c37d91688a3ab58d65c15686737892965711adc Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/7242 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'tcl/target')
-rw-r--r--tcl/target/rp2040.cfg12
1 files changed, 9 insertions, 3 deletions
diff --git a/tcl/target/rp2040.cfg b/tcl/target/rp2040.cfg
index ee45542..0593e03 100644
--- a/tcl/target/rp2040.cfg
+++ b/tcl/target/rp2040.cfg
@@ -26,12 +26,12 @@ if { [info exists CPUTAPID] } {
set _CPUTAPID 0x01002927
}
-# Set to '0' or '1' for single core configuration,
-# anything else for isolated debugging of both cores
+# Set to '0' or '1' for single core configuration, 'SMP' for -rtos hwthread
+# handling of both cores, anything else for isolated debugging of both cores
if { [info exists USE_CORE] } {
set _USE_CORE $USE_CORE
} else {
- set _USE_CORE { 0 1 }
+ set _USE_CORE SMP
}
set _BOTH_CORES [expr { $_USE_CORE != 0 && $_USE_CORE != 1 }]
@@ -54,6 +54,12 @@ if { $_USE_CORE != 0 } {
$_TARGETNAME_1 cortex_m reset_config sysresetreq
}
+if {[string compare $_USE_CORE SMP] == 0} {
+ $_TARGETNAME_0 configure -rtos hwthread
+ $_TARGETNAME_1 configure -rtos hwthread
+ target smp $_TARGETNAME_0 $_TARGETNAME_1
+}
+
if { $_USE_CORE == 1 } {
set _FLASH_TARGET $_TARGETNAME_1
} else {