DockStar JTAG

Original Pogoplug, v2 Pink/Gray E02, Series 4, DockStar, and GoFlex installation and device help here.

Re: DockStar JTAG

Postby jtagfun » Sun Aug 29, 2010 9:43 pm

I tried the following in "dockstar.cfg" to backup the first page (2KB) of nand:

proc backup {} {
init
dockstar_init # replaced "sheevaplug_init"
nand probe 0
nand list
nand dump 0 "nand00000.bin" 0 0x800
}

And got:

Open On-Chip Debugger
> backup
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff0000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
NAND flash device 'NAND 256MiB 3,3V 8-bit' found
#0: NAND 256MiB 3,3V 8-bit (Micron) pagesize: 2048, buswidth: 8,
blocksize: 131072, blocks: 2048
dumped 2048 bytes in 20.421875s (0.098 kb/s)

I have verified the dump with the first 2KB of mtd0.
It took 1.5 hours to backup the first 512KB (Uboot) using un-buffered jtag cable.

I also used the following to backup OOB data for Uboot:

nand dump 0 "nand00000.bin" 0 0x800 oob_only
jtagfun
 
Posts: 24
Joined: Sun Aug 29, 2010 11:37 am

Re: DockStar JTAG

Postby bzboi » Mon Aug 30, 2010 1:24 pm

jtagfun wrote:I also used the following to backup OOB data for Uboot:

nand dump 0 "nand00000.bin" 0 0x800 oob_only


Good work jtagfun. That's a good point that I forgot about. I take that back about this not belonging in the Wiki. Would you be willing to write something up on how to backup the uboot environment bootloader parameters? Specifically documenting address ranges to be careful of stepping on.
bzboi
 
Posts: 55
Joined: Sun Jul 11, 2010 5:39 pm

Re: DockStar JTAG

Postby jtagfun » Mon Aug 30, 2010 3:33 pm

I only learned the concept of OOB and the differences between NAND and other types of memory yesterday. I need to verify ways of secure NAND backups, e.g., compare backups using JTAG and Jeff's NAND dump.
I'm using Windows PC and have not used Jeff's NAND dump yet, I only did "dd" backup of all mtd's.
I'll do env backups tonight. I did quite few TI ARM unlocks/debricks, but they use different type of flash memory.
I'm still in the process of learning NANDs and not ready to edit your Wiki yet.
jtagfun
 
Posts: 24
Joined: Sun Aug 29, 2010 11:37 am

Re: DockStar JTAG

Postby bzboi » Mon Aug 30, 2010 4:15 pm

no worries. whenever you're ready. It'll be a good addition! Thanks.
bzboi
 
Posts: 55
Joined: Sun Jul 11, 2010 5:39 pm

Re: DockStar JTAG

Postby jtagfun » Mon Aug 30, 2010 10:50 pm

Based on "sheevaplug.cfg"
proc sheevaplug_reflash_uboot_env { } {

# reflash the u-Boot environment variables area
sheevaplug_init
nand probe 0
nand erase 0 0xa0000 0x40000
nand write 0 uboot-env.bin 0xa0000 oob_softecc_kw
resume

}

I used the following in "dockstart.cfg" to back up ENV:

proc backup_env {} {
init
dockstar_init
nand probe 0
nand list
nand dump 0 "nandA0000.dat" 0xA0000 0x10000 # 64KB data only
nand dump 0 "nandA0000.oob" 0xA0000 0x10000 oob_only # 64 KB OOB only
nand dump 0 "nandA0000.bin" 0xA0000 0x10000 oob_raw # 64 KB data and OOB

#nand dump 0 "nandB0000.bin" 0xB0000 0x10000 oob_raw # 64KB (all 0x0000)
#nand dump 0 "nandC0000.bin" 0xC0000 0x10000 oob_raw # 64KB (all 0x55AA)
#nand dump 0 "nandD0000.bin" 0xD0000 0x10000 oob_raw # 64KB (all 0x55AA)
#nand dump 0 "nandE0000.bin" 0xE0000 0x10000 oob_raw # 64KB (all 0x55AA)
#nand dump 0 "nandF0000.bin" 0xF0000 0x10000 oob_raw # 64KB (all 0x55AA)
}

Only a small portion of NAND starting 0xA0000 has ASCII data, the rest are zeros or 0x55AA.
jtagfun
 
Posts: 24
Joined: Sun Aug 29, 2010 11:37 am

Re: DockStar JTAG

Postby klingon » Tue Aug 31, 2010 12:06 am

Kragorn wrote:I've bought an Universal JTAG cable ( http://www.tiaowiki.com/w/Universal_JTA ... _(Parallel) ).


Kragorn - I also have the same tiao universal JTAG adaptor. I've configured as buffered JTAG (wiggler mode). Did you plug in the mini USB cable to supply power to the JTAG? And did you connect the ground cable from the JTAG? I get error msgs when I start openocd. Thanks.

parport port = 0x378
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
Warn : use 'feroceon.cpu' as target identifier, not '0'
Info : clock speed 500 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.
Command handler execution failed
Warn : jtag initialization failed; try 'jtag init' again.
klingon
 
Posts: 5
Joined: Sun Jul 18, 2010 2:23 pm

Re: DockStar JTAG

Postby Kragorn » Tue Aug 31, 2010 7:26 am

I've followed their instrcutions. Si yes I've plugged the usb and the GND cable.
Kragorn
 
Posts: 11
Joined: Wed Aug 11, 2010 4:35 pm

Re: DockStar JTAG

Postby ygator » Wed Sep 01, 2010 9:41 pm

You can get the Universal JTAG Adapter for Routers, Modem, FTA and More! from http://www.diygadget.com/jtag-cables/universal-jtag-adapter-for-routers-modem-fta-and-more.html for only $16.14. It is priced at $18.99, but if you use the coupon code XBOX-SCENE you get 15% off making it only $16.14. I got the code from the banner when I clicked http://www.tiaowiki.com/w/Universal_JTAG_User_Manual_(Parallel). I have not received mine yet, but I believe it is the same one that kragorn used.

To hook it up to the dockstar I plan on using something similar to http://www.dealextreme.com/details.dx/sku.2246
ygator
 
Posts: 77
Joined: Tue Aug 10, 2010 9:37 pm

Re: DockStar JTAG

Postby firestormv1 » Fri Sep 03, 2010 7:04 pm

I need some help.

I've almost gotten to a point where I'll just bruteforce the thing to get it to work but there are so many different configurations, my head is about to explode. I'm in the process of writing this up for my site but damned if I can get it to work right. Of course credit is given.

The issue is that I can't get the JTAG to work, and the wiggler instructions are confusing me.

I'm using a "generic" wiggler from TIAO and it is configured as follows. I don't know the difference between TRST, SRST nRSt, etc.

The generic wiggler has a row designated PDB (D1-D17), Bin (A1-A8), Bout (Y1-Y8), then the Dockstar's port I'm going to call X(1-10)

Code: Select all
<-----Wiggler Board------->|<---Dockstar
Dsub                       |
(Header PDB)  (Bin)(Bout)  |(Dockstar)
D1   -  NC                 |
D2   - Orange - A1=Y1 - Orange - X3
D3   - Green  - A2=Y2 - Green  - X4
D4   - Yellow - A3=Y3 - Yellow - X5
D5   -  Red   - A4=Y4 -   Red  - X2
D6   -  White - A5=Y5 - White  - X7
D7   - Purple - A6=Y6 - Purple - NC
                           |
D11  - Blue   - Y8=A8 - Blue   - X6
                           |

The colors above are in reference to the TAIO Wiki site, specifically this image:
http://www.tiaowiki.com/w/Image:Univers ... er.597.jpg

I have attached a lead from the GND of the Dockstar, to the Wiggler GND, and to my serial CA42 GND to make sure levels are the same. From the wiggler (not connected to PC to the CA42's USB shield, I have continuity across all four devices so it's not a ground issue. (Wiggler GND to Dockstar USB port shield to GND pin on Dockstar header to shield of USB / PC)

When I start OpenOCD, I can run init, but that's about it. Trying sheevaplug_init gives errors and it has never been able to find the nand when I do a nand probe 0 per the instructions here:
http://Arch Linux ARM.com/index.php5?title=Ha ... up_Windows

Here is the output of what I'm getting. OpenOCD telnet session:
Code: Select all
Open On-Chip Debugger
> init
> halt
Target not examined yet
Command handler execution failed
in procedure 'halt' called at file "command.c", line 650
called at file "command.c", line 361
> halt
Target not examined yet
Command handler execution failed
in procedure 'halt' called at file "command.c", line 650
called at file "command.c", line 361
> sheevaplug init
Runtime error, file "command.c", line 650:
    invalid command name "sheevaplug"
> sheevaplug_init
Embedded ICE version 0
feroceon.cpu: hardware has 1 breakpoint/watchpoint unit
unexpected Feroceon EICE version signature
target was in unknown state when halt was requested
Halt timed out, wake up GDB.
timed out while waiting for target halted
Command handler execution failed
in procedure 'sheevaplug_init' called at file "command.c", line 650
in procedure 'wait_halt' called at file "C:\Program Files\OpenOCD\0.4.0\bin\../board/dockstar.cfg", line 32
called at file "command.c", line 361
> nand probe 0
NAND flash access requires halted target
NAND flash access requires halted target
NAND flash access requires halted target
NAND flash access requires halted target
NAND flash access requires halted target
NAND flash access requires halted target
unknown NAND flash device found, manufacturer id: 0x00 device id: 0x00
probing failed for NAND flash device
> halt
Halt timed out, wake up GDB.
timed out while waiting for target halted
Command handler execution failed
in procedure 'halt' called at file "command.c", line 650
called at file "command.c", line 361
>


When I start out with OpenOCD (commandline) it gives me the following errors.
Code: Select all
C:\Documents and Settings\Administrator>openocd -f board/dockstar.cfg
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
parport port = 0x378
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
Warn : use 'feroceon.cpu' as target identifier, not '0'
Info : clock speed 500 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.
Command handler execution failed
Warn : jtag initialization failed; try 'jtag init' again.
Info : accepting 'telnet' connection from 0
Info : Embedded ICE version 0
Info : feroceon.cpu: hardware has 1 breakpoint/watchpoint unit
Error: unexpected Feroceon EICE version signature
Info : Halt timed out, wake up GDB.
Error: timed out while waiting for target halted
Command handler execution failed
Info : Halt timed out, wake up GDB.
Error: timed out while waiting for target halted
Command handler execution failed
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.
error: -100



Also, what in the world is the pinout of the header on the dockstar itself? Based on what I've seen here, it's along the lines of:

Pin 1 - Unknown - Here be dragons.
Pin 2 - RSET (nRST or sRST? what is the difference?)
Pin 3 - TDI
Pin 4 - TMS
Pin 5 - TCLK
Pin 6 - TDO
Pin 7 - SRST or nRST?
Pin 8 - RxD (Serial)
Pin 9 - TxD (Serial)
Pin 10 - Vss (GND)

If I can get a clarification on what I'm botching up here, I can complete my post and finally get this thing working once and for all. Unfortunately, I did something stupid and typed in "nand erase" at the CE> prompt and when I desperately tried to recover the dd image of the bootloader (didn't know about the checksum that prevents you from doing that), the dockstar went nonresponsive.

I would greatly appreciate any help and I apologize for the length of this post. I really want to get this solved and want to make sure I'm not leaving an important piece of information behind.

Thank you.
firestormv1
 
Posts: 7
Joined: Fri Sep 03, 2010 6:33 pm

Re: DockStar JTAG

Postby bzboi » Fri Sep 03, 2010 7:53 pm

About to hit the road, so I'll have to keep this short.

I don't have a wiggler, so I'll let the other folks jump in on that subject.

The dockstar pinout is in the first post of this thread. Pin 1 is Vcc, but at first glance you have the rest correctly identified. I didn't get the chance to look up the Wiggler pinout, but you probably want to verify the Wiggler pin names against the first post in any case. It might be as simple as a connectivity issue.

I just want to confirm, what address do you have set for LPT1 on your computer? parport.cfg in OpenOCD has a default setting of 0x378 so you might need to change your PC setup (usually a setting in BIOS) or the easier thing is to change it in parport.cfg to reflect what your PC is using.

Report back so that we can systematically rule out possible causes.

Good luck!
bzboi
 
Posts: 55
Joined: Sun Jul 11, 2010 5:39 pm

PreviousNext

Return to Pogoplug v1/v2/v4, DockStar, GoFlex

Who is online

Users browsing this forum: Bing [Bot] and 4 guests