flash wrt54gl using olimex arm-usb-ocd,how?

Hallo:

I am trying to use a olimex arm-usb-ocd (usb->jtag 20 pin debugger)

to flash my router wrt54gl. I don’t know what I do wrong. Pls help me.

this is how i did until now:

Hardware:

OS: linux 2.6.31-ARCH i686

jtag debugger: arm-usb-ocd http://www.olimex.com/dev/arm-usb-ocd.html

cable: self made jtag 12(14 without Vddh+one ground) to 20 cable

some picture:

board http://wiki.openwrt.org/media/oldwiki/ … ort__.jpg

my board http://www.jabbertor.de/bilder/wrt54gl_board.png

my cable http://www.jabbertor.de/bilder/cable_jtag12to20.png (sry for

bad picture)

software:

  1. libftdi is used as module:

lsmod | grep ftdi

ftdi_elan 30320 0

ftdi_sio 53732 0

usbserial 36104 1 ftdi_sio

usbcore 154032 8

ftdi_elan,ftdi_sio,usbserial,usbhid,usb_storage,ohci_hcd,ehci_hcd

  1. Open On-Chip Debugger 0.3.0-dev-snapshot (2009-10-18-20:00)

my openocd.cfg:

source [find interface/olimex-arm-usb-ocd.cfg]

GDB can also flash my flash!

gdb_memory_map enable

gdb_flash_program enable

source [find target/ar71xx.cfg]

root console ouput:

openocd -f openocd.cfg

Open On-Chip Debugger 0.3.0-dev-snapshot (2009-10-18-20:00)

$URL$

For bug reports, read

http://openocd.berlios.de/doc/doxygen/bugs.html

jtag_nsrst_delay: 100

jtag_ntrst_delay: 100

trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain

Info : clock speed 6000 kHz

Error: JTAG scan chain interrogation failed: all zeroes

Error: Check JTAG interface, timings, target power, etc.

Error: JTAG scan chain interrogation failed: all zeroes

Error: Check JTAG interface, timings, target power, etc.

Thanks for response

avogatro

avogatro:
2. Open On-Chip Debugger 0.3.0-dev-snapshot (2009-10-18-20:00)

my openocd.cfg:

source [find interface/olimex-arm-usb-ocd.cfg]

GDB can also flash my flash!

gdb_memory_map enable

gdb_flash_program enable

source [find target/ar71xx.cfg]

A long shot… but

Does this line really include the correct file?

source [find interface/olimex-arm-usb-ocd.cfg]

As a test you could just cut and paste the content from that file into your main one, so you know that it is successful…

/Johan

Same value

but I think wrt54gl use a broadcom mips32 cpu.

I can’t find mips in the target dir.

I was looking trough your pictures, where you mention you don’t use the jtag voltage… But do you have your target GND actually connected with the programmer? You need that in first place in order to get any communication at all.

well maybe…

this is the common 14 min jtag

1 -Vddh (+3.3v) 2 - Vss (ground)

3 - nTRST 4 - Vss (ground)

5 - TDI 6 -Vss (ground)

7 - TM S 8 -Vss (ground)

9 - TCK 10-Vss (ground)

11- TDO 12-nRESET (optional)

13- Vddh (+3.3v) 14-Vss (ground)

I didn’t connect 1 and 2 .

this is the layout of the ARM-USB_OCD:

http://www.olimex.com/dev/images/arm-jtag-layout.gif

you mean i have to create a Voltage difference between 1 and 2?

using some resistance?

or just connect one the 5 ground to some other ground?

You generally need to connect the voltage reference pin from the board power supply to VREF, to drive the level converters in the USB JTAG pod.

Well, Which power supply pin?

board is huge.

I am just scared to connect the whole 12V*1A to the 3.3V VREF.

normal wrt54gl flasher use a unbuffered LPD cable like this:

http://oldwiki.openwrt.org/attachments/ … ffered.png

It does’t have a Vcc, because it has only 12 pin, not 14 like normal jtag.

Edit:

I read

http://wiki.openwrt.org/oldwiki/openwrt … jtag_cable

they say if using a buffed cable, I have to use the VCC, from ping 1 of some serial port nearby with 3.3V.

I will give it a try.

But what is the difference between vcc vref and vtarget???

http://www.olimex.com/dev/images/arm-jtag-layout.gif

avogatro:
But what is the difference between vcc vref and vtarget???

http://www.olimex.com/dev/images/arm-jtag-layout.gif

I don't think I've got a formal answer for an actual 20pin arm port;

but on the arm-usb-ocd internally there is an R0 connecting the two (check with your multi-meter)

So you only need to attach vref and leave vtarget open.