On 02/07/2010 22:00, David Brownell wrote:
I committed the "transport" framework patch; you've
seen it on the list before, the main difference ince
the last post was adding user's guide docs.
(This has been ready for some time, and I got tired of just carrying it
privately. It's groundwork, and shouldn't affect anyone's work; but if it
does, we should learn about it, and fix that soonish.)
To recap: debug-capable transports are JTAG or SWD
... with SWD (still) on the way. JTAG init changed just a bit.
Programming-capable transport examples can include SPI and UART -- someone
wanting to contribute to the OpenOCD project might want to look at those.
You could for example update the AVR ISP programming support to use a
to-be-written SPI
transport, hooking up to the current skeletal AVR8 support. Similarly, both TI/Luminary
and NXP versions of Cortex-M3 support SPI for initial flashing of firmware, and a good
"SPI" transport should be able to work on those chips too. (I know some of the
swiss-army-knife style debug adapters can do SPI easily.)
Just as a note this breaks anything other than ftdi dongles.
For any legacy setup that does not register any transports, by the time
adapter_init (creating default transport) is called it is to late our
cfg has executed and failed due to unregistred jtag cmd's.
[debuglog]
Debug: 32 16 command.c:133 script_debug(): command - ocd_command
ocd_command type ocd_parport_port 0x378
Debug: 33 16 command.c:133 script_debug(): command - parport_port
ocd_parport_port 0x378
User : 35 16 command.c:543 command_print(): parport port = 0x378
Debug: 36 16 command.c:133 script_debug(): command - ocd_command
ocd_command type ocd_parport_cable wiggler
Debug: 37 16 command.c:133 script_debug(): command - parport_cable
ocd_parport_cable wiggler
Debug: 39 16 configuration.c:87 find_file(): found
../../openocd/tcl/board/microchip_explorer16.cfg
Debug: 40 16 configuration.c:87 find_file(): found
../../openocd/tcl/target/pic32mx.cfg
Debug: 41 16 command.c:133 script_debug(): command - ocd_command
ocd_command type ocd_adapter_nsrst_delay 100
Debug: 42 16 command.c:133 script_debug(): command - adapter_nsrst_delay
ocd_adapter_nsrst_delay 100
User : 44 16 command.c:543 command_print(): adapter_nsrst_delay: 100
User : 45 16 command.c:828 openocd_jim_vfprintf(): Runtime error, file
"../../openocd/tcl/target/pic32mx.cfg", line 29:
User : 46 16 command.c:828 openocd_jim_vfprintf(): invalid command
name "jtag_ntrst_delay"
User : 47 16 command.c:828 openocd_jim_vfprintf(): called at file
"../../openocd/tcl/board/microchip_explorer16.cfg", line 10User : 48 16
command.c:828 openocd_jim_vfprintf():
User : 49 16 command.c:828 openocd_jim_vfprintf(): called at file
"openocd.cfg", line 30User : 50 16 command.c:828 openocd_jim_vfprintf():
User : 51 16 command.c:828 openocd_jim_vfprintf(): called at file
"embedded:startup.tcl", line 57User : 52 16 command.c:828
openocd_jim_vfprintf():
User : 53 16 command.c:828 openocd_jim_vfprintf(): in procedure 'script'
User : 54 16 command.c:828 openocd_jim_vfprintf():
[/debuglog]
i have tested the first two possible solutions and they fix the problem:
1. add interface_transports to all the cfgs.
2. call allow_transports from the adapter driver.
3. tweak the order that msg's are registered - not easy.
comments?
Cheers
Spen
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development