Jtag


Manwe

Still Fresh
Joined
Apr 29, 2006
Messages
69
I just bought ARM-JTAG by Olimex (here it is), cut 20 pins connector and solder a few wires to GP2X's Ext connector (taken from TV cable). For the GP2X side, I took info from here: pin numbers and pin values.
So, I soldered 4 data wires (TDO, TCK, TMS, TDI) and 2 ground wires. JTAG Tool can't see GP2X :( Then, I resoldered TDO to TDI and TDI to TDO (thought, Input must be connected to Output). Nothing. Got the same message again:
Jatg - Using port 0x378
JTAG interface reset.
Device ID..0x00000000
CPU Not Support!
Now, I have a last chance: may be I missed some wires? Should I connect nTRST (what is it - TRS or nRESET?) or +3.3V as well? And how TDO/TDI must be connected to each other?
 
I just bought ARM-JTAG by Olimex (here it is), cut 20 pins connector and solder a few wires to GP2X's Ext connector (taken from TV cable). For the GP2X side, I took info from here: pin numbers and pin values.
So, I soldered 4 data wires (TDO, TCK, TMS, TDI) and 2 ground wires. JTAG Tool can't see GP2X :( Then, I resoldered TDO to TDI and TDI to TDO (thought, Input must be connected to Output). Nothing. Got the same message again:
Jatg - Using port 0x378
JTAG interface reset.
Device ID..0x00000000
CPU Not Support!
Now, I have a last chance: may be I missed some wires? Should I connect nTRST (what is it - TRS or nRESET?) or +3.3V as well? And how TDO/TDI must be connected to each other?

To get JTAG working, you really need all of the pins hooked up. From the EXT Port printout from the wiki, make sure you have pins 13 to 20 wired up to your ARM-JTAG cable from the EXT Port.

Also, pin 5 of the standard ARM JTAG connector is TDI. This is wired up to pin 17 of the EXT port, which is labeled as TDI as well on the diagram. TDO is pin 13 of the ARM JTAG connector, it is wired up to pin 14 of the EXT Port.
 
Last edited by a moderator:
Thank you, Darkdave! I'll try to do it. But I like to ask one question before: on GP2X pins 20 and 21 are +3V. What pin of ARM-JTAG I need to connect to them? Pin 1 or pin 2? It's not clear to me, sorry.
 
Thank you, Darkdave! I'll try to do it. But I like to ask one question before: on GP2X pins 20 and 21 are +3V. What pin of ARM-JTAG I need to connect to them? Pin 1 or pin 2? It's not clear to me, sorry.

The +3.3V is definitely pin 1 of the ARM JTAG connector. The standard ARM JTAG connector has 20 pins, and usually all even numbered pins will be tied to ground on the connector.
 
Last edited by a moderator:
The +3.3V is definitely pin 1 of the ARM JTAG connector. The standard ARM JTAG connector has 20 pins, and usually all even numbered pins will be tied to ground on the connector.
[/quote]

Oh wait, I forgot that pin 2 is usually left floating. None of the boards I've ever worked on used pin 2 for the VTarget . They just use pin 1 as VRef. Pin 2 would be used if the target board doesn't have it's own power supply.
 
Well, it's much better now. I connected +3V to 20th GP2X's pin. Now I got "Device ID..0xFFFFFFFF" instead of "Device ID..0x00000000".
But still "CPU Not Support!". Any ideas?

And what "sh: can't access tty; job control turned off" exactly means? Can't it cause the problem?

By the way, I running GP2X from very good batteries, because I have no DC adapter at all. Hope, it makes no difference?
 
Well, it's much better now. I connected +3V to 20th GP2X's pin. Now I got "Device ID..0xFFFFFFFF" instead of "Device ID..0x00000000".
But still "CPU Not Support!". Any ideas?

And what "sh: can't access tty; job control turned off" exactly means? Can't it cause the problem?

By the way, I running GP2X from very good batteries, because I have no DC adapter at all. Hope, it makes no difference?

I don't use the JTAG tool you've mentioned, so I'm not sure about the error message you are seeing.

There's a couple of software programs out there that you can use to test the JTAG link to your GP2X. I would suggest downloading the free OCD Commander program from www.macraigor.com. This is what I use to connect to my GP2X. Plus, the Olimex cable you have is compatible with this software. And it's a good way to know if your cable is all hooked up properly.

With OCD Commander, make sure you have selected ARM920T as the processor. In order to connect, you must turn the power on to your GP2X a second or so before hitting the OK button in OCD Commander to initiate the JTAG connection, otherwise it won't connect if the power is on too long before connecting.
 
Last edited by a moderator:
Thank you, darkdave. I downloaded OCD Commander for Windows.
What I got with OCD Interface Device set to "Wiggler" and speed set to "1-380 KHz" (default):
- get_version : not yet initialized (01 : 06)

Does it means, my Olimex ARM-JTAG connected wrong to GP2X or it complitely broken or I used software in wrong way?

UPDATE: oh, yes! I got a RESULT! May be I turned GP2X faster this time.
So, I have STATUS "In DEBUG mode" and can view registers now, great!
Guess, cable works fine.
darkdave, you are guru, thank you! :)

What is strange, I have had such result only a few times. Now, I trying to repeat it, but got "not yet initialized" again :(
I have read interesting note here: http://www.olimex.com/dev/arm-jtag.html
OCDeamon toolchain and debugger from Macraigor Systems. Quite unstabile software, when it wants to work it works, when it doesn't want to work it doesn't. too dependand of computer CPU speed, parallel port settings etc.

So, OCD Commander can works not well too, I assume?

What software can you recommend to reflash GP2X?
I found any "H-JTAG freeware RDI151 server" on that Olimex homepage, it even can see GP2X (detect ARM9 0x10920F0F), but I don't know what to do with it :)
I also downloaded u-boot image from here: http://www.artaylor.co.uk/~richard/gp2x/dev/u-boot.html

And here is Embest Flash Programmer Tool: http://www.embedinfo.com/English/Product/flashprogrammer.asp - there are too many settings (like flash chip manufacturer), which makes me confused.
 
I have had very good success using OCD Commander to connect to my GP2X. It will connect almost every time, but I'm using a Macraigor Raven cable instead of the Wiggler.

To reflash the U-Boot, I hacked up a version of U-Boot v1.0.1. I modified the code to generate an .elf file that is compatible with OCD Commander. OCD Commander can natively load .elf files to a target device. It's posted on archive.gp2x.de at:

http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,42,1562

There's a Readme.txt file in there that I wrote that describes what to do. Essentially, you just need to place the gp2xboot.img file on a freshly formatted SD card and place it in the GP2X. Next, get a connection going with OCD Commander, and use the download command to download the u-boot.elf file to the GP2X. Last, type "go 0x3f00000" to start running the binary. From there, the u-boot screen should pop up and jump to the Firmware update screen. It shouldn't take more than a minute or two to complete. If it's successful, you can power cycle the unit, and the bootloader should be restored.

After that, I would recommend only using the official FW versions to reflash your unit. If you need to, Flash only the gp2xkernel.img file next from a freshly formatted SD card. Finally, copy all of the FW files minus gp2xboot.img and gp2xkernel.img to the SD card to reflash the filesystem and tools, assuming they were corrupted to begin with.
 
Darkdave, you are definitely guru - under your direction I finally fixed my GP2X! :) Many thanks!

First time I run OCD Commander today, I got connection with GP2X. May be by a lucky chance, may be because I turned off antivirus monitoring :)

Then I downloaded u-boot.elf to the GP2X with OCD Commander.
By the way, information on NAND was not erased, so I got fully working GP2X after this procedure, even with Vektar on NAND memory. I'm happy now :)
 
Back
Top