Hello Simon :-)

On Wed, Jan 12, 2011 at 6:57 PM, simon qian <simonqian.open...@gmail.com> wrote:
> 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.

I think Interface should be initialized first as this also impacts
futrher program usage - in UrJTAG i have made it that initerface/cable
init also selects transport as only one cable can be used at time.
When cable is initialized then target can be initialized (ie.
JTAG-TO-SWD sequence and then IDCODE read). So cable initialization
also selects cable configuration and program configuration/transport.

> I try to remove the jtag scripts.
> And it's impossible to remove all these scripts, because -chain-position is 
> necessary.

I have lost some time to make swd transparent to jtag so jtag commands
call swd operations but this is dead end, so dont go in there, swd
must be implemented as separate transport, just as David did. In
UrJTAG target configuration, registers, names and their lengths are
read at runtime from external user configuration files, so in fact all
devices are virtual, also operations on them are device dependent so
it did not work to get unified. Ofcourse there is a list of devices in
chain, but for SWD this chain only contains one device - ARM-SW-DP
(possibly for other transports some adequate target-specific access
port). I am not sure wether SWD can support star topology (rather
not). I hope this helps somehow ;-P

Best rehards :-)
Tomek

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to