JTAG:
[GND ; TDO ; TMS ; TCK ; TDI ; TRST_n* ]
[V3.3 ; SPI_DIN** ; SPI_DO** ; SPI_CLK** ; SPI_EN** ; GND ]
* I_havent check the SPI connection
*)TRST_n* is pulled down , so if you only have 4 wire JTAG, it should connected to Vcc
# flash size will be probed
set _FLASHNAME $_CHIPNAME.flash
# format flash bank name driver base size chip_width bus_width target
flash bank $_FLASHNAME cfi 0xBF000000 8388608 2 2 $_TARGETNAME
#flash bank $_FLASHNAME cfi 0x0 8388608 2 2 $_TARGETNAME
echo "allocating work area"
$_TARGETNAME configure -work-area-phys 0x80040000 -work-area-size 4096
echo "allocation complete"
#Folloing code may not work, in that case you need to manually reset init
#and manually load your u-boot.bin at starting address (0x0) of flash (not RAM).
#starting Address of flash can be found in old dump of serial console or at ddwrt forum/openwrt forum
$_TARGETNAME configure -event reset-init {
#reset
echo "halting the target!!!!!!!!!!!!!!!!!!!!!!!!!!!"
halt
echo "init SDRAM controller..........................@@@@@@@@@@@@@@@@@@@@"
mww 0x10000300 0xd1825272
mww 0x10000304 0xe0120300
echo "Find flash..."
flash probe 0
echo "Load u-boot .."
load_image uboot.bin 0x80000000 bin
# resume 0x80000000
}
Finally i success loading uboot;
working uboot.bin attached(not guaranteed to work)
The openocd v 0.9.0 is have register "a" bug
i use the openocd 0.8.0 and success.
config file:
RT3052.cfg
set _CHIPNAME rt3052
set _ENDIAN little
set _CPUTAPID 0x1305224F
# flash size will be probed
set _FLASHNAME $_CHIPNAME.flash
# format flash bank name driver base size chip_width bus_width target
flash bank $_FLASHNAME cfi 0xBF000000 8388608 2 2 $_TARGETNAME
# flash bank $_FLASHNAME cfi 0x0 8388608 2 2 $_TARGETNAME
echo "allocating work area"
$_TARGETNAME configure -work-area-phys 0x80040000 -work-area-size 4096
echo "allocation complete"
#Folloing code may not work, in that case you need to manually reset init
#and manually load your u-boot.bin at starting address (0x0) of flash (not RAM).
#starting Address of flash can be found in old dump of serial console or at ddwrt forum/openwrt forum
$_TARGETNAME configure -event reset-init {
#reset
echo "halting the target!!!!!!!!!!!!!!!!!!!!!!!!!!!"
halt
echo "init SDRAM controller..........................@@@@@@@@@@@@@@@@@@@@"
mww 0x10000300 0xd1825272
mww 0x10000304 0xe0120300
mww 0x1000030c 0x0511ffa1
echo "Find flash..."
flash probe 0
echo "Load u-boot to RAM.."
load_image uboot.bin 0x80000000 bin
echo "Load u-boot to FLASH .."
I tryed hooking up the jtag to the lpt port, but no luck for now.
I wired the TRST to the VCC of the header directly , is it correct?
I notice that if I remove the TRST-VCC joint the jtag dont seems to be recognized.(I tryed to put a 100ohm resistor between and the result is the same).
I used your rt3052.cfg file changing only the interface section as the dulluj user did (he was using a cable like mine I suppose).
This is my openocd rt3052.cfg file:
Code:
#RT3052.cfg
set _CHIPNAME rt3052
set _ENDIAN little
set _CPUTAPID 0x1305224F
# flash size will be probed
set _FLASHNAME $_CHIPNAME.flash
# format flash bank name driver base size chip_width bus_width target
flash bank $_FLASHNAME cfi 0xBF000000 8388608 2 2 $_TARGETNAME
# flash bank $_FLASHNAME cfi 0x0 8388608 2 2 $_TARGETNAME
echo "indirizzo parport "$_PARPORTADDR
echo "allocating work area"
$_TARGETNAME configure -work-area-phys 0x80040000 -work-area-size 4096
echo "allocation complete"
#Folloing code may not work, in that case you need to manually reset init
#and manually load your u-boot.bin at starting address (0x0) of flash (not RAM).
#starting Address of flash can be found in old dump of serial console or at ddwrt forum/openwrt forum
$_TARGETNAME configure -event reset-init {
#reset
echo "halting the target!!!!!!!!!!!!!!!!!!!!!!!!!!!"
halt
echo "init SDRAM controller..........................@@@@@@@@@@@@@@@@@@@@"
mww 0x10000300 0xd1825272
mww 0x10000304 0xe0120300
mww 0x1000030c 0x0511ffa1
echo "Find flash..."
flash probe 0
echo "Load u-boot to RAM.."
load_image uboot.bin 0x80000000 bin
echo "Load u-boot to FLASH .."
The execution stops at "allocation complete" and don't go on , it hangs there with no errors.
I can reach the openocd telnet at the chosen port (23 in my rt3052.cfg file) but issuing a
Code:
flash probe 0
it give me that error.
Code:
Target not halted
auto_probe failed
in procedure 'flash'
I m not really confident that the cable is working, how could I check it ? (some openocd commands)
Another thing, could you please share some commands for openocd flashing.
I'm not an expert on OpenOCD, but i have suggestion that may help.
Try to do step by step programming procedure again on telnet like halt the processor (so the JTAG can work), flash probe,....
So the config file only used for JTAG & cable initialization , and last time i try the programming step manual in telnet, and try some command from command list to access and trouble shoot too