JTAG and the Stellaris Launchpad
The LM4F Stellaris Launchpad has a built in ICDI (In Circuit Debug Interface) which means you can program it out of the box with a USB cable and nothing more. In addition, just like the LM3S Dev Kits of yore, it has JTAG breakout pins in a convenient .1″ header size that enable both the use of the launchpad as a JTAG interface to program another board, and to use your favorite JTAG adapter of choice to program the LM4F chip on the Launchpad. Unlike the old LM3S kits though the JTAG pins on the Stellaris launchpad are not immediately broken out into a convenient header, nor is the interface automatic as it once was. That said it is still incredibly easy to breakout should you desire to do so.
———————————————————————–
UPDATE: Open source black magic probe lets you run a GDB server on your launchpad thus enabling advanced command line debug features. See article here:
http://forum.stellarisiti.com/topic/637-black-magic-probe-for-stellaris-launchpad/#entry3264
————————————————————————
The following is an abstraction from the official TI Wiki on “LaunchPad Debug How To”
http://processors.wiki.ti.com/index.php/Stellaris_LM4F120_LaunchPad_Debug_How_To
There are two ways to use the JTAG, they are named from the perspective of the Launchpad:
Debug Out is using the Launchpad to program another board, hence the debug signal is going out of the board.
Debug In is using an external debug adapter to program the Launchpad, hence the debug signal is coming in to the board.
NOTE: currently Debug Out only supports ICDI, Debug In however can be done via ICDI or SWD (serial wire debug)
To enable Debug Out
- Remove Power Jumper (this disables the lower LM4F chip and thus prevents it from intercepting the JTAG signals)
- Connect wires from the JTAG pins below the top LM4F chip to the target.
- Wire together a common ground wire between the Launchpad and the target
- Optional: connect the TXD and RXD pins for the UART to the ICDI Virtual Serial Port so you can see the debug
To enable Debug In
- Connect JTAG sinals from off board debug adapter to the JTAG pins on the Launchpad
- Connect the EXT-DBG pin to ground to disable to onboard ICDI on the Launchpad so it does not interfere
- Optional: connect the TXD and RXD pins for the UART to the ICDI Virtual Serial Port so you can see the debug
JTAG Pinout
Sources: