Difference between revisions of "Maple JTAG How To"

From OpenCircuits
Jump to navigation Jump to search
(Replaced content with 'The [http://wiki.leaflabs.com/index.php?title=Maple_JTAG_How_To Maple JTAG How To] has moved to the [http://wiki.leaflabs.com LeafLabs wiki].')
 
(8 intermediate revisions by one other user not shown)
Line 1: Line 1:
This is a page about using [http://en.wikipedia.org/wiki/Joint_Test_Action_Group JTAG] with Maple - JTAG will allow you to use a debugger like GDB to debug programs running on the Maple. You can also use the JTAG adapter to re-flash (re-install) the bootloader in case you "brick" the board and can't install programs on it via the bootloader.
+
The [http://wiki.leaflabs.com/index.php?title=Maple_JTAG_How_To Maple JTAG How To] has moved to the [http://wiki.leaflabs.com LeafLabs wiki].
 
 
== JTAG Debugger ==
 
 
 
You need a piece of hardware called a JTAG debugger to manage the connection and debugging of the Maple. These plug into your computer via USB and into the Maple via its JTAG port.
 
 
 
* [http://www.olimex.com/dev/arm-usb-ocd.html Olimex ARM-USB-OCD] - only this debugger is known to work. Olimex's ARM-USB-TINY is known not to work.
 
* [http://www.sparkfun.com/products/7834 ARM-USB-OCD at Sparkfun]
 
 
 
If you know of other JTAG debuggers that are known to work, add them here.
 
 
 
== JTAG Adapter ==
 
 
 
Maple's 8-pin JTAG port is non-standard, so you need an adapter circuit to go between the ARM 20-pin connector and the Maple 8-pin connector.
 
 
 
* [https://github.com/adamfeuer/maple/tree/master/jtagadapter Maple JTAG adapter circuit and board layout] - the one in Maple's source tree may work, but has extra resistors and other errors. This circuit is known to work.
 
* [https://github.com/adamfeuer/maple/raw/master/jtagadapter/maple-jtagadapter.png Circuit diagram]
 
* [https://github.com/adamfeuer/maple/blob/master/jtagadapter/maple-jtagadapter-brd.png picture of PCB design]
 
 
 
== OpenOCD ==
 
 
 
[http://openocd.berlios.de/web/ OpenOCD] is a program that can talk with the JTAG debugger. You can give commands to it directly, or you can configure GDB to use it to control your Maple board.
 
 
 
Download the latest version of OpenOCD, build it, and install it. Then you can use Maple's build tools (Make) to run the JTAG debugger, or run it standalone so you can connect via another program.
 
 
 
You will need to edit the OpenOCD configuration files to make them work with recent OpenOCD versions. Make the following changes:
 
* File support/openocd/run.cfg:
 
** Add at the beginning of the file
 
<pre>
 
#daemon configuration
 
telnet_port 4444
 
gdb_port 3333
 
</pre>
 
** Replace this line:
 
<pre>
 
-flash bank stm32x 0x08000000 0x00020000 0 0 $_TARGETNAME
 
</pre>
 
 
 
with this:
 
 
 
<pre>
 
set _FLASHNAME $_CHIPNAME.flash
 
flash bank $_FLASHNAME stm32x 0x08000000 0x00020000 0 0 $_TARGETNAME
 
</pre>
 
 
 
== Eclipse C/C++ ==
 
 
 
You
 

Latest revision as of 10:31, 24 December 2010

The Maple JTAG How To has moved to the LeafLabs wiki.