Post Reply 
[my dead 50g] Is alive!!
09-23-2019, 12:37 AM (This post was last modified: 09-23-2019 12:38 AM by Claudio L..)
Post: #1
[my dead 50g] Is alive!!
Finally, I was able to resurrect my 50g which suffered from accidental boot loader overwrite.
For the record, I used a Bus Blaster with the openocd config file shown below.

I had a lot of trouble halting the CPU because I did not connect any of the nRST or sRST lines. The last line catches all exceptions and halts, hence it halted due to "invalid instruction" because the flash was empty.
Once halted, I was able so simply use the command "flash write_image ..." to send a complete flash image from x49gp. It did not work, failed with some errors I didn't understand but... when I did a memory dump (mdw comand), I realized it actually had programmed more than the 16 kbytes of the boot loader.

So it was a partial success, I wasn't able to write the complete image and I can't honestly say what went wrong, but knowing the whole bootloader went in, I simply power-cycled the calc with + and - and got the message on the screen. From there I flashed newRPL from my SD card and my calculator is back to life.
Of course, it suffered some permanent changes:
* I lost the white rubber that pushes the reset button, it fell on the floor when I was trying to put it in the right position to close the calc and I couldn't find it.
* Of course, my calc now has a JTAG cable coming out of the side with a phone cable jack (I know, not ideal but I used whatever I had handy).
* The serial number was lost forever, since my calc didn't have the sticker in the back. Now it uses the generic serial number from x49gp.

But I'm happy with the results... now I'm tempted to use the Bus Blaster with a Prime...

Code:

 #
# Bus Blaster
#
# http://dangerousprototypes.com/docs/Bus_Blaster
#

set CPUTAPID 0x0032409d


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

if { [info exists ENDIAN] } {
   set _ENDIAN $ENDIAN
} else {
  # This config file was defaulting to big endian..
   set _ENDIAN little
}

if { [info exists CPUTAPID] } {
   set _CPUTAPID $CPUTAPID
} else {
   # Force an error until we get a good number.
   set _CPUTAPID 0xffffffff
}




source /usr/share/openocd/scripts/interface/ftdi/dp_busblaster.cfg
adapter_khz 50
transport select jtag

reset_config none

#jtag scan chain
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm920t -endian $_ENDIAN -chain-position $_TARGETNAME

# speed up memory downloads
arm7_9 fast_memory_access enable
arm7_9 dcc_downloads enable


$_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x1000

flash bank $_CHIPNAME.extflash cfi 0x00000000 0x200000 2 2 $_TARGETNAME jedec_probe


init
arm9 vector_catch all
Find all posts by this user
Quote this message in a reply
10-06-2019, 06:47 PM
Post: #2
RE: [my dead 50g] Is alive!!
Nice that you recovered it and thanks for sharing!

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)