diff --git a/tcl/target/rp2040.cfg b/tcl/target/rp2040.cfg index ee455420b..0593e03ba 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 {