release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Wiki > Main > GigabeatFJTAG (compare)

Difference: GigabeatFJTAG (r12 vs. r11)

JTAG and Console port : Access and Debug your Gigabeat F

About the JTAG port

The Gigabeat F has a JTAG port available on the front of the PCB under the LCD. This port has 10 pins total. Christophe Nicolas has traced the pins and created a pinout of the port. I have included this pinout below layed out as if you were looking at the front of the PCB. Pin 1 is on the right side and is denoted by a white arrow on the board.

-- Note that there is no connector mounted on the PCB from the factory.

  • Jtag connector:
    jtag_connector.JPG
10 9 8 7 6 5 4 3 2 1
TDI TxD0 TMS TDO TCK nRESET Vcc RxD0 nTRST GND

To communicate to the JTAG port I used a Xilinx Parallel III cable. Digilent sells a cable that should be compatible with the Xilinx Parallel III on their website for $12 USD (The JTAG3).

The main connections needed to communicate to the Gigabeat with the Parallel III are the TDI, TMS, TDO, TCK, Vcc, and GND. Pin 2 and 5 connect to the Nreset and NTRST pins indirectly through what we think is a TC7W08?. The pinout for this is as follows (Pin 1 and 5 are connected to each other):

1 2 3 4 5 6 7 8
Pin 5 JTAG pin 5 NTRST GND Pin 1 JTAG pin 2 Nreset Vcc

The NTRST and Nreset pins can be used by OpenOCD with a cable that supports them, the Parallel III does not have pins to drive them so they were unused with this cable.

Soldering Recommendations

The first connection I made to the Gigabeat used solid copper wire from an Ethernet cable. This ended pulling out my ground contact due to the stress on the board when moved. I also could not fully assemble the Gigabeat with the setup.

A flat ribbon cable is recommended to make your connections. On my second connector I used a floppy disk drive cable and cut a piece about 10cm long, 10 wires wide. The ribbon cable spacing almost matches the spacing on the PCB making soldering easier. I connected all 10 pins on the second connector (the first only had TDI, TMS, TDO, TCK, Vcc, and GND).

The floppy connector is stranded wire and my connections to the programming cable are flying leads (note: need to include pictures). To connect to the flying leads I used the solid Ethernet wire, cut pieces 1 cm in length and soldered those to the stranded wire on one end of the ribbon cable.

Soldering to the PCB is not difficult as long as you make sure that you have enough solder on the ribbon wire before you attempt to bond it to the board. Only 2, or, at the most 3 mm of stranded wire should be exposed for soldering to the PCB. This will reduce the chance that wires end up crossed after soldering.

Taking the solder wire near the PCB is not recommended. Instead give each wire on the ribbon cable a thin coat of solder. It should be enough so that when you touch the wire on the board with the iron it reflows onto the board pad (meaning only a thin coat, no globs).

OpenOCD

  • OpenOCD is a JTAG debugging tool originally written by Dominic Rath to debug ARM devices. It has a number of features allowing you to debug programs running on the target.
  • OpenOCD can be used to program the flash with the patch attached: openocd_non_spansion.diff. The patch will allow you to write and erase to the flash in the Gigabeat. This patch works well as long as you run the giga.init script after connecting to the debugger with telnet. Programming the entire flash takes about 30 seconds. You may also use the GigabeatFlash plugin as a faster alternative.
  • There are installation instructions in the links section below. When running configure make sure to add parallel port mode (./configure --enable-parport) if you are using a JTAG3, or Parallel III cable. Check the compilation instructions when using a different cable.
  • OpenOCD also requires a configuration file at runtime. Here is a sample file that will work with the Parallel III or JTAG3 cable: openocd.cfg. This configuration file includes the flash and processor setup necessary; cables other than the JTAG3 or Parallel III will require modifications to the file.

Flash

Here is a link to a preliminary version of the Gigabeat Flashwriter. This should not be used unless you have a JTAG interface connected to your player. More work needs to be done to the gigabeat bootloader to make sure that the device is properly initialized.

About the console port

  • on the JTAG connector you also have a RXD0 and TXD0 signal. These are the serial out and in of the cpu
  • you can connect these signals to your computer via a serial interface based on the max233cpe (schematic soon...)
  • open a terminal on your computer and configure it for 115200 8 N 1.
  • if your program writes to the Gigabeat cpu serial port 0 you will see the message on the terminal.
  • if the program accepts input from the serial port you can type your command on the terminal ( if you boot into the original firmware you'll have a linux terminal where you can do what you want)

Links

r13 - 13 May 2010 - 04:53:33 - KarlKurbjun

Revision r12 - 02 May 2008 - 02:37 - KarlKurbjun
Revision r11 - 13 Mar 2008 - 22:30 - JasonStahls
Copyright by the contributing authors.