JTAG Use

Overview

Once the Jtag buffer board is contructed and tested the jtag program can be used to program the WearARM flash with the boot loader.

Debugging a new buffer board

The "wiggle" program can be used to toggle the individual PC parallel port signals. Using the program to toggle each signal allows one to trace the signal with a scope and make sure the correct signal is changing on the JTAG port itself.

	wiggle 

	The signal name can be ether a data port pin # (0-3) or a
	letter (c,i,m,r)

	arg	signal
	---	------
	0,c	tck
	1,i	tdi
	2,m	tms
	3,r	trst

Programming the flash

The 'jtag' program is used to manipulate the flash on the WearARM board via the JTAG port. Connect the jtag buffer board to the pc and weararm and connect the power supply to the weararm board and the buffer board.

Apply power and check for smoke :-)

You'll need a binary image file of the blob boot loader, 'blob'.

Id the cpu:

	jtag -i

Erase the flash:

	jtag -e

Program and verify the flash:

	jtag -p blob
	jtag -v blob

Reset the cpu:

	jtag -r

Optionally, you can dump the flash contents to see what got programmed:

	jtag -d

After you program the flash and reset the cpu you should see blob output on the serial port. The baud rate is 57,600 8N1. If not, try power cycling a few times.

If nothing comes out of the serial port you can use the 'jtag -d' command to dump the flash and compare it with the output of 'od -x blob'. If they are the same double all of the serial port connections.

If you are really stuck you can fall back to the simple programs in the 'ram/flash' directory which wiggle gpio pins. They can be programmed with jtag and you can use an oscilliscope to verify they are running.