This is an automated email from Gerrit.

"Thomas Schneider <q...@chaotikum.eu>" just uploaded a new patch set to Gerrit, 
which you can find at https://review.openocd.org/c/openocd/+/7806

-- gerrit

commit 3d709e0dcd19b920c28b05bcd49172678d3ed6c9
Author: Thomas Schneider <q...@chaotikum.eu>
Date:   Wed Oct 4 18:05:30 2023 +0200

    tcl/target/rk3399.cfg: Run $_smp_command through `eval`
    
    In contrast to this comment[0], it does make a difference using `eval`:
    without it, the arguments are not split, but only one string with spaces.
    The implementation of `target smp` expects a list of arguments, however:
    
    > Debug: 145 2 command.c:155 script_debug(): command - target smp  
rk3399.lcore0 rk3399.lcore1 rk3399.lcore2 rk3399.lcore3 rk3399.bcore4 
rk3399.bcore5
    > Debug: 146 2 target.c:6494 jim_target_smp(): 2
    > Error: 147 2 command.c:1335 parse_ullong(): Invalid command argument
    
    Using `eval`, the arguments are split on whitespace as intended.
    
    [0]: https://review.openocd.org/c/openocd/+/5994/comment/ceda9b01_259b041d/
    
    Link: 
https://review.openocd.org/id/Id73795634a57e0b551c53b9c1cbe7d59db8a3893
    Signed-off-by: Thomas Schneider <q...@chaotikum.eu>
    Fixes: 307fe3730 (tcl/target: add Rockchip RK3399 target, 2021-01-01)

diff --git a/tcl/target/rk3399.cfg b/tcl/target/rk3399.cfg
index 1e90414fdb..26865b1505 100644
--- a/tcl/target/rk3399.cfg
+++ b/tcl/target/rk3399.cfg
@@ -30,7 +30,7 @@ dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
 target create $_CHIPNAME.ahb mem_ap -dap $_CHIPNAME.dap -ap-num 0
 set _TARGETNAME $_CHIPNAME.lcore
 # declare the 6 main application cores
-set _smp_command ""
+set _smp_command "target smp"
 
 set $_TARGETNAME.base(0) 0x80030000
 set $_TARGETNAME.base(1) 0x80032000
@@ -74,6 +74,6 @@ for { set _core 0 } { $_core < $_cores } { incr _core 1 } {
     set _smp_command "$_smp_command ${_TARGETNAME}$_core"
 }
 
-target smp $_smp_command
+eval $_smp_command
 
 targets rk3399.lcore0

-- 

Reply via email to