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:
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):
| Pin 5
|| JTAG pin 5
|| Pin 1
|| JTAG pin 2
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.
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 is a JTAG debugging tool primarily designed for ARM devices.
- There is a link to the manual on the OpenOCD wiki page that gives detailed setup information.
- As a note: If you are using a JTAG3 or Parallel III cable "configure" will need to be called with the "--enable-parport" option (i.e. ./configure --enable-parport).
- Check the compilation instructions when using a different cable.
- OpenOCD requires a board and a cable configuration file specified at runtime.
- The included gigabeatf.cfg file contains all of the needed setup information to connect to the board.
- For example: if you want to call OpenOCD with the parallel III cable and the supplied board configuration the command would be as follows: "./openocd -f interface/parport_dlc5.cfg -f board/gigabeatf.cfg".
can be used to program the Gigabeat F NOR flash with the latest Git tree.
- Programming flash works well as long as you initialize the processor with the "gigf_init" function in the attached configuration file.
- Programming the entire flash takes about 30 seconds.
- The GigabeatFlash plugin may be used as a faster alternative.
A preliminary version of the Gigabeat Flashwriter
is available. 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)
Copyright © by the contributing authors.