DockStar JTAG

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Re: DockStar JTAG

Postby Rosi » Sat Aug 28, 2010 5:04 pm

Rosi
 
Posts: 5
Joined: Thu Aug 26, 2010 6:17 pm

Re: DockStar JTAG

Postby ygator » Sat Aug 28, 2010 5:53 pm

@Rosi

I can't answer your question, but just wanted to add that the 2x5 header has a 2.54mm pitch where as the dockstar has 2mm pitch. So it will not just plug into the dockstar.
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: DockStar JTAG

Postby bzboi » Sat Aug 28, 2010 8:47 pm

@z80yyz Thanks! I found http://Arch Linux ARM.com/index.php5?title=Ha ... Reflashing and it seems that I should have tftp-ed the compressed image rather that unzip it first. I'll try it when I get back to work on Monday. I did notice that there is a setting that differs from the factory settings you provided:-
$this->bbcode_second_pass_code('', 'Set the boot arguments to match the ramdisk size:
setenv bootargs $(console) root=/dev/mtdblock2 initrd=0x1000000,0xb39a59
(that last number is the ramdisk size in hex that showed after tftp)')

@candlejack Thanks! Kragorn did most of the tool research. If it wasn't for him pointing me in the right direction, I'd still be futzing with writing my own BSDL file. All I did was figure out the steps to load and write a new uboot to a blank NAND using the halt/reset workaround. I'm not familiar with the Wiggler, but since you already have the circuit, no harm trying it out without either reset pin attached. The Xilinx Parallel Cable III for example does not have either as the JTAG standard doesn't require the TRST# and SRST# lines. Use the "parport" interface first and if that doesn't work, try the "parport_dlc5" interface in the dockstar.cfg file that Kragorn provided. You might need to install RP1/R166 though, I still haven't had a chance to verify the procedure works without them.

@rosi If it's truly a Xilinx Parallel Cable III compatible programmer, it should work with the "parport_dlc5" interface. ygator is right that you have to physically adapt the pinout to match the Dockstar pinout and spacing.
bzboi
 
Posts: 55
Joined: Sun Jul 11, 2010 5:39 pm

Re: DockStar JTAG

Postby bzboi » Sun Aug 29, 2010 12:15 am

I wrote up a Arch Linux ARM Wiki entry at http://Arch Linux ARM.com/index.php5?title=Ha ... kStar_JTAG
bzboi
 
Posts: 55
Joined: Sun Jul 11, 2010 5:39 pm

Re: DockStar JTAG

Postby candlejack » Sun Aug 29, 2010 8:22 am

Success!
Here are the steps i followed.

Build myself a wiggler adapter after a schematic fount here :
http://www.ic-board.de/product_info.php?language=en&info=p14_Wiggler.html&XTCsid=30d201dec3f969ee7ac770bb2907866e
I actually did some small parts change like using 51ohm resistors instead of the parallel 100ohm, using a BC547 instead of the BC857 as i didn't wanted to solder SMD-parts, one 4,7µF instead of the parallel 2µFs and only one 100nF, because it was quickly available to me. However, electronically those changes don't make a difference.
I didn't populate RP1 !
Dockstar Pin7 on the Adapter Pin15 going to RST, i don't know if this is necessary.
Dockstar Pin2 externally pulled up with 4.7kohm, which is the same as populating R166 only without soldering on the dockstar-board. This was necessary, I tried it without the pull up to no success.

Using Ubuntu 10.4, installed OpenOCD which comes as 0.3 but it will setup your system. Then downloading the Ubuntu 10.10 OpenOCD package which contains 0.4 and installing it manually, since it has the exact same prerequisites as the 10.4 package there were no open dependencies .

Interface: parport in the dockstar.cfg

Then in openOCD:
-init
-sheevaplug_init
-load_image
-resume

Terminal in uBoot:
-nand write.e (somehow this was not enough, maybe my image of uboot was not good enough)
-saveenv
-run bootcmd

inside old pogo os
-brought up network
-installed new bootloader -> http://www.Arch Linux ARM.com/index.php5?title=Arch Linux ARM:Pogoplug_Setboot#Install_the_new_uBoot_on_mtd0
here i had to install with --no-uboot-check (or however its named) cause the uboot-original-mtd0.kwb i wrote was not recognized as original uboot and didn't boot from mtd0. (Now i think this is how i bricked my dockstar in the first place by installing this image)
However the install script ran completely and now my dockstar boots from usb or chainloads the "original" when no usb is connected.
candlejack
 
Posts: 6
Joined: Sat Aug 28, 2010 3:50 pm

Re: DockStar JTAG

Postby bzboi » Sun Aug 29, 2010 11:55 am

$this->bbcode_second_pass_quote('candlejack', '
')Then in openOCD:
-init
-sheevaplug_init
-load_image
-resume

Terminal in uBoot:
-nand write.e (somehow this was not enough, maybe my image of uboot was not good enough)
-saveenv
-run bootcmd


Congrats! I left you PM as well, but figured I should post anyway. Did you have to run the halt/reset workaround? You had not mentioned it in your procedure, and could explain your nand write issue.

Can you provide a little more detail on $this->bbcode_second_pass_quote('candlejack', '
')-nand write.e (somehow this was not enough, maybe my image of uboot was not good enough)

What error messages did you see? You didn't mention erasing the NAND first, but did you erase NAND just enough for the uBoot image, ie 524288 bytes? Or did you erase a larger area than that? If you did erase more than 512k, you would have erased the uboot environment parameters as well. You would probably get an error message about bad CRC32 if so. I believe that if you do a setenv at this point, uBoot repopulates default parameters to replace the corrupt uboot environment.

From what I understand of the nand probe 0 problem, (see http://code.google.com/p/openrd/issues/detail?id=7), the I/O driving the JTAG reset signal is push-pull (ie the signal is either forced to 3.3V or 0V), when it really should be open-drain (ie when the reset is asserted, the pin is pulled to 0V, but otherwise an external pull-up keeps the signal at 3.3V).

I need to confirm this, but I think the difference between having an running uBoot or not is the state of the MPP[6] on the SoC, and hence the need to run the halt/reset workaround if your bricked Dockstar does not drive MPP[6] low, which subsequently affects reset on the PWR_RST_3V3_JTAG line. It really seems to vary slightly from board-to-board and is also dependent on the reset chip thresholds.
bzboi
 
Posts: 55
Joined: Sun Jul 11, 2010 5:39 pm

Re: DockStar JTAG

Postby candlejack » Sun Aug 29, 2010 1:45 pm

erasing the NAND first: now that you mention it, that was my error. Oh that's probably how i bricked my uboot the first time, not erasing before a write :roll:
Well Yes i did get the CRC error on the parameters before using the saveenv to correct them.

As to the halt problem i had problems with your workaround but not without it.
$this->bbcode_second_pass_quote('', 'p')roc sheevaplug_init { } {

# We need to assert DBGRQ while holding nSRST down.
# However DBGACK will be set only when nSRST is released.
# Furthermore, the JTAG interface doesn't respond at all when
# the CPU is in the WFI (wait for interrupts) state, so it is
# possible that initial tap examination failed. So let's
# re-examine the target again here when nSRST is asserted which
# should then succeed.
jtag_reset 0 1
feroceon.cpu arp_examine
halt 0
jtag_reset 0 0
wait_halt
...

from the dockstar.cfg
I think that says the jtag_reset utilizes nSRST, if so, as my cable had pin7 connected through the inverter to some reset-signal, that's why.

I googled some more on jtag and foung a good description on the wiggler, although in German
http://www.mikrocontroller.net/articles/JTAG
in short:
$this->bbcode_second_pass_code('', '
DB25.2 -> INVERSE -> JTAG.15 (nSRST) -> DOCKSTAR 7
DB25.3 -> JTAG.7 (TMS) -> DOCKSTAR 4
DB25.4 -> JTAG.9 (TCK) -> DOCKSTAR 5
DB25.5 -> JTAG.5 (TDI) -> DOCKSTAR 3
DB25.6 -> JTAG.3 (TRST) -> shoud be DOCKSTAR 2 ( couldn't verify this )
DB25.11 <- JTAG.13 (TDO) <- DOCKSTAR 6

DB25.18-25 -> GND

DB25.8 <-> DB25.15 for use with ocdremote (OpenOCD or H-JTAG don't need it )
')
so much for using the first schematic to find and from there go by try and error, if i only knew this before.
candlejack
 
Posts: 6
Joined: Sat Aug 28, 2010 3:50 pm
Top

Re: DockStar JTAG

Postby bzboi » Sun Aug 29, 2010 2:06 pm

Hmm, the German is a little beyond me, even with Google translate. I'd linked to your original wiggler schematic in the Wiki. Do you have a better schematic to link to? Would you mind reviewing the Wiki entry and adding a section for Wiggler specific setup? I suspect that since it's DIY, many more people will try it than with the DLC5. In fact, if anyone with a FTDI based JTAG tries this, please update the Wiki since most folks will prefer using USB.
bzboi
 
Posts: 55
Joined: Sun Jul 11, 2010 5:39 pm

Re: DockStar JTAG

Postby jtagfun » Sun Aug 29, 2010 3:20 pm

your wiki is a great one.

As for the wiggler clones, I believe the one in the following link is more accurate:

http://oldwiki.openwrt.org/OpenWrtDocs% ... Cable.html

The one in your wiki does not have pin 6 (TRST*) connected. Pin 17 shouldn't be grounded since it's "SELECT_IN" control bit of standard parallel port.

The wigglers have open collector driver for SRST* pin, may not need the work around (pushing reset pin).
jtagfun
 
Posts: 24
Joined: Sun Aug 29, 2010 11:37 am

Re: DockStar JTAG

Postby candlejack » Sun Aug 29, 2010 4:09 pm

$this->bbcode_second_pass_quote('jtagfun', '
')The wigglers have open collector driver for SRST* pin, may not need the work around (pushing reset pin).

Thats what i encountered in my DIY approach.
As for a better Schematic do you mean this one?
Image
I try and do one for the Dockstar.
candlejack
 
Posts: 6
Joined: Sat Aug 28, 2010 3:50 pm
Top

PreviousNext

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 7 guests