When SWD is initializing, in swd_select, get_current_target is called.
But maybe target is not initialized here.
Log:
Warn : 25 47 transport.c:127 allow_transports(): must select a transport.
Debug: 26 47 transport.c:130 allow_transports(): allow transport 'jtag'
Debug: 27 63 transport.c:130 allow_transports(): allow transport 'swd'
Debug: 28 63 command.c:151 script_debug(): command - ocd_command ocd_command
type ocd_transport select swd
Debug: 29 63 command.c:151 script_debug(): command - ocd_transport
ocd_transport select swd
Error: 30 63 target.c:372 get_current_target(): BUG: current_target out of
bounds

If I put interface configuration after target configuration, it will also
fail.
Because some scripts in target configuration depends on the interfaces.
Log:
Debug: 22 47 command.c:151 script_debug(): command - ocd_command ocd_command
type ocd_adapter_nsrst_delay 100
Debug: 23 47 command.c:151 script_debug(): command - adapter_nsrst_delay
ocd_adapter_nsrst_delay 100
User : 25 47 command.c:557 command_print(): adapter_nsrst_delay: 100
User : 26 47 command.c:679 command_run_line(): Runtime Error: stm32.cfg:29:
invalid command name "jtag_ntrst_delay"
in procedure 'script'

I try to remove the jtag scripts.
And it's impossible to remove all these scripts, because -chain-position is
necessary.
Log:
Debug: 26 47 command.c:151 script_debug(): command - ocd_command ocd_command
type ocd_target create stm32.cpu cortex_m3 -endian little -chain-position
stm32.cpu
Debug: 27 63 command.c:151 script_debug(): command - ocd_target ocd_target
create stm32.cpu cortex_m3 -endian little -chain-position stm32.cpu
Error: 28 63 command.c:1429 parse_ulong(): Invalid command argument
User : 29 63 command.c:679 command_run_line(): Runtime Error:
embedded:startup.tcl:20: -chain-position required when creating target

-- 
Best Regards, SimonQian
http://www.SimonQian.com
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to