Skip to main content
Topic: help needed! unbrick wrt54gs v6. help me please... (Read 5750 times) previous topic - next topic

help needed! unbrick wrt54gs v6. help me please...

Hi there all,
greetings!
this is my first post here and also my mother tongue is not english, so kindly ignore the errors here.
i purchased a second hand wrt54gs v6, the neutered router, and then tried to install openwrt. but it has only 2 MB flash, so i replaced the 2 MB flash with a 4 MB flash. and i also did populate the jtag headers and i extracted the old firmware aka wholeflash.
now the problem is i cannot bring back the device back to life. i tried to flash the cfe but the cfe stays as it is and it will go back to bricked state (all leads stable) after a tftp upgrade via cfe.
so i purchased a bus pirate and i am trying to make the wrt54gs v6 work with the new flash which is 4 MB.
so now my question is how do i do it?
any help is appriciated.
cpu is bcm5352ekebc and flash is ST 29w320DT.
the plan is to put the original vxworks firmware which i got via backup:wholeflash using an unbuffered jtag into the new ST 29w320DT flash via bus pirate.
i am new to bus pirate just exactly 3 days back i got it. i did try to follow the instructions and i couldnt get it to work with the latest firmware. so i had to downgrade the firmware from 5.10 to 4.2 which has the jtag option. but i am still unable to get it to work. i tried all the options and permutations and combinations with both 5.10 and 4.2 (boot loader is v4.4) but i get the error "is binary/openocd support enabled?"
iirc i did enable openocd and the ftd2xx and everything, which is in wiki openocd 0.5 and also openocd git, but nothing seem to help me to get this to work. any step by step help is waited eagerly, since i am only 3 days old with buspirate, okay 3.75 days old with bus pirate. :-D
thanks
-paul

Re: help needed! unbrick wrt54gs v6. help me please...

Reply #1
could you try this? viewtopic.php?f=27&t=1702#p17536

Re: help needed! unbrick wrt54gs v6. help me please...

Reply #2
testuser@debian-testing:~/buspirate$ ./pirate-loader_lnx --dev=/dev/ttyUSB0 --hex=busPirate.production.hex
+++++++++++++++++++++++++++++++++++++++++++
  Pirate-Loader for BP with Bootloader v4+ 
  Loader version: 1.0.1  OS: Linux
+++++++++++++++++++++++++++++++++++++++++++

Parsing HEX file [busPirate.production.hex]
Checksum does not match, line 4
Could not load HEX file, result=-1

as uid!=0

&

root@debian-testing:/home/testuser/buspirate/ds30client# ./ds30client_linux --dev=/dev/ttyUSB0 --hex=busPirate.production.hex --verbose
+++++++++++++++++++++++++++++++++++++++++
+ DS30Loader client for Buspirate v2/v3 +
+++++++++++++++++++++++++++++++++++++++++

Parsing HEX file [busPirate.production.hex]
Checksum does not match, line 4
Could not load HEX file, result=-1


robot where am i screwing it up?

Re: help needed! unbrick wrt54gs v6. help me please...

Reply #3
okay via the BuccaneersDen-0.1.2 i did upload the firmware. but it got no jtag in the menu, like with 4.2 it was 6 th in m mode/menu. now i dont see the option jtag in the menu
HiZ>i
Bus Pirate v3a
Firmware v6.0RC (r572)  Bootloader v4.4
DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8)
http://dangerousprototypes.com
HiZ>m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
9. DIO
x. exit(without change)

(1)>

helpppppppppp! jtag which was earlier 6 now just vapourised. well i am still in the 3+ day old with buspirate. so kindly bear with my retarded stupidity.

 

Re: help needed! unbrick wrt54gs v6. help me please...

Reply #4
try the openocd....

That thread i pointed you to was clearly about openocd and you are trying to find some jtag menu, that has been removed few years back. there just isnt any :-)

Re: help needed! unbrick wrt54gs v6. help me please...

Reply #5
created "openocd-ftdi-5352-main.cfg "

telnet_port 4444
gdb_port 2001

#interface
#interface ft2232
interface buspirate
#ft2232_device_desc "TJTAG-PRO USB FT2232H A"
#ft2232_layout "jtagkey"
#ft2232_vid_pid 0x0403 0x6001
#jtag_khz 1500
adapter_khz 1500
#jtag_nsrst_delay 1500
adapter_nsrst_delay 1500
jtag_ntrst_delay 1500



#jtag scan chain
# formatL IRC  IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
#jtag_device 8 0x01 0x7f 0x1e

if { [info exists CHIPNAME] } { 
  set  _CHIPNAME $CHIPNAME 
} else { 
  set  _CHIPNAME bcm5352
}

if { [info exists ENDIAN] } { 
  set  _ENDIAN $ENDIAN 
} else { 
  set  _ENDIAN little
}

if { [info exists CPUTAPID ] } {
  set _CPUTAPID $CPUTAPID
} else {
  # force an error till we get a good number
  set _CPUTAPID 0x0535217F
}

gdb_memory_map enable
gdb_flash_program enable


#jtag_nsrst_delay 250
#jtag_ntrst_delay 250

#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config srst_only
#reset_config srst_only srst_pulls_trst
#reset_config trst_and_srst separate
#reset_config trst_and_srst srst_pulls_trst
#reset_config trst_and_srst separate trst_push_pull srst_push_pull
#reset_config trst_and_srst separate


#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag newtap $_CHIPNAME cpu -irlen 8  -ircapture 0x1 -irmask 0x7f -enable -expected-id $_CPUTAPID

set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
target create $_TARGETNAME mips_m4k -endian $_ENDIAN -chain-position $_TARGETNAME

#$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x80300000  -work-area-size 0x40000 -work-area-backup 0

#flash bank <driver> <base> <size> <chip_width> <bus_width>


flash bank 0 cfi 0x1fc00000 0x200000 2 2 0


#$_TARGETNAME configure -event halted { script bcm5352.script }

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

created buspirate.cfg

interface buspirate
buspirate_port /dev/ttyUSB0
buspirate_speed fast
buspirate_vreg 0
buspirate_mode open-drain
buspirate_pullup 0
reset_config srst_only


and when i run
root@buspirate:/home/buspirate# openocd -f buspirate.cfg -f openocd-ftdi-5352-main.cfg -c "init"
Open On-Chip Debugger 0.7.0-dev-00145-gd631b2e (2013-01-27-00:23)
Licensed under GNU GPL v2
For bug reports, read
        hxxp://openocd.sourceforge.net/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
Warn : Interface already configured, ignoring
adapter speed: 1500 kHz
adapter_nsrst_delay: 1500
jtag_ntrst_delay: 1500
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
Warn : use 'bcm5352.cpu' as target identifier, not '0'
Error: Error reading data
Error: Buspirate error. Is binary/OpenOCD support enabled?
root@buspirate:/home/buspirate# openocd -f buspirate.cfg -f openocd-ftdi-5352-main.cfg         
Open On-Chip Debugger 0.7.0-dev-00145-gd631b2e (2013-01-27-00:23)
Licensed under GNU GPL v2
For bug reports, read
        hxxp://openocd.sourceforge.net/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
Warn : Interface already configured, ignoring
adapter speed: 1500 kHz
adapter_nsrst_delay: 1500
jtag_ntrst_delay: 1500
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
Warn : use 'bcm5352.cpu' as target identifier, not '0'
Error: Error reading data
Error: Buspirate error. Is binary/OpenOCD support enabled?
root@buspirate:/home/buspirate# openocd -f openocd-ftdi-5352-main.cfg
Open On-Chip Debugger 0.7.0-dev-00145-gd631b2e (2013-01-27-00:23)
Licensed under GNU GPL v2
For bug reports, read
        hxxp://openocd.sourceforge.net/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
adapter speed: 1500 kHz
adapter_nsrst_delay: 1500
jtag_ntrst_delay: 1500
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
Warn : use 'bcm5352.cpu' as target identifier, not '0'
Error: You need to specify the serial port!
in procedure 'init'
root@buspirate:/home/buspirate# openocd -f openocd-ftdi-5352-main.cfg -c "init"
Open On-Chip Debugger 0.7.0-dev-00145-gd631b2e (2013-01-27-00:23)
Licensed under GNU GPL v2
For bug reports, read
        hxxp://openocd.sourceforge.net/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
adapter speed: 1500 kHz
adapter_nsrst_delay: 1500
jtag_ntrst_delay: 1500
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
Warn : use 'bcm5352.cpu' as target identifier, not '0'
Error: You need to specify the serial port!
in procedure 'init'
root@buspirate:/home/buspirate#


so now WTF (W=where) am i going wrong and WTF am i doing wrong?


can anyone now tell me where am i doing what wrong, please!

Re: help needed! unbrick wrt54gs v6. help me please...

Reply #6
to robots,
i got that part okay. so i did a little bit of reading. and i came up with that. but stilllllllllllllllllllllllllllllllllll
Error: Error reading data
Error: Buspirate error. Is binary/OpenOCD support enabled?

what is going wrong here? or what am i doing wrong here?

Re: help needed! unbrick wrt54gs v6. help me please...

Reply #7
[quote author="quackquack"]to robots,
i got that part okay. so i did a little bit of reading. and i came up with that. but stilllllllllllllllllllllllllllllllllll
Error: Error reading data
Error: Buspirate error. Is binary/OpenOCD support enabled?

what is going wrong here? or what am i doing wrong here?[/quote]

Please calm down. This is a forum full of hobyist who do things in their spare time.

Do you run the special version with openocd enabled? See also our wiki here:  http://dangerousprototypes.com/docs/Bus ... nd_OpenOCD

Direct link to the openocd enabled v6.0 firmware is here: viewtopic.php?f=27&t=1702#p17536

Re: help needed! unbrick wrt54gs v6. help me please...

Reply #8
sjaak,
yes you are right. i need to chill.
and yes i did use robots's firmware
HiZ>i
Bus Pirate v3a
Firmware v6.0RC (r572)  Bootloader v4.4
DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8)
http://dangerousprototypes.com
HiZ>

still i get the same error

check the log file please.

mmmm speed change? now i got a new issue speed change. and the full debug log. can someone decipher whats in the log?

Re: help needed! unbrick wrt54gs v6. help me please...

Reply #9
dont select fast speed ... it seems that new computers are just tooo fast for this change :-) and buspirate wont react that fast.
instead of fast type normal. (inthe openocd config)