PandaBoard JTAG Debugging

Since the OMAP4 based PandaBoard comes with a JTAG header, there are several software tools, emulators that could be utilized to debug software running on the board. Please feel free to update this list or provide more information about other methods that may be available.

CCSv4
CCS stands for Code Composer Studio, which is an IDE developed by TI. CCSv4 can be downloaded from here.

Below link has information about Linux aware debug related information with CCSv4, this is relevant to Panda/OMAP4 as well. http://processors.wiki.ti.com/index.php?title=Linux_Aware_Debug

GEL files required for connecting, initializing the external memory interface etc. is available here: http://processors.wiki.ti.com/index.php/OMAP4_Debug_and_Trace_Tools

Steps to connect properly to the cores on OMAP4: 1. First connect to CortexA9_0 and CortexA9_1 2. Then while you're in CortexA9_0 (highlighted in blue) goto Scripts menu 3. Select Reset and run the following 3 scripts: reset_ducati_cortexM3_RTOS_board reset_ducati_cortexM3_SIMCOP_board reset_tesla_C64_board Now you should be able to connect to each of the above mentioned cores.

We have been able to connect to both Cortex A9s on the PandaBoard with CCSv4.2 and view/edit memory/registers, halt, run, single step etc. Tested emulators include BH-560USB-M and XDS100v2. Others are being tested.

CCSv5
CCSv5 supports both Linux and Windows hosts and could be downloaded from here. We have been able to connect to both Cortex A9s on the PandaBoard with CCSv5 and view/edit memory/registers, halt, run, single step etc. Tested emulators include BH-560USB-M and XDS100v2. Others are being tested.

GEL files required for connecting, initializing the external memory interface etc. is available here: http://processors.wiki.ti.com/index.php/OMAP4_Debug_and_Trace_Tools

Steps to connect properly to the cores on OMAP4: 1. First connect to CortexA9_0 and CortexA9_1 2. Then while you're in CortexA9_0 (highlighted in blue) goto Scripts menu 3. Select Reset and run the following 3 scripts: reset_ducati_cortexM3_RTOS_board reset_ducati_cortexM3_SIMCOP_board reset_tesla_C64_board Now you should be able to connect to each of the above mentioned cores.

See the below wikis for more information: http://processors.wiki.ti.com/index.php/Linux_Debug_in_CCSv5 http://processors.wiki.ti.com/index.php/Linux_Host_Support

TRACE32
The OMAP4430 includes a dual Cortex-A9 and some other cores which are all supported by Lauterbach tools.

Start-Up scripts, documents and updates are available at http://www.lauterbach.com/scripts/arm/omap4430/pandaboard/all_files.zip

Lauterbach tool connection:
Please use the correct TI-14 pin to ARM-20 pin adapter when trying to use a Lauterbach emulator: http://www.lauterbach.com/frames.html?order/ord__7748.html OR Below two together: http://tincantools.com/product.php?productid=16144&cat=0&page=1&featured http://tincantools.com/product.php?productid=16146&cat=0&page=1&featured

For connecting a trace probe ("Preprocessor" or "CombiProbe") for off-chip trace (PTM or STM) an adapter board which can be plugged onto the PandaBoard is provided: LA-3840 "Trace Converter for OMAP4430 PandaBoard". It provides a connector for a "Preprocessor" for 16-bit off-chip program trace (PTM) and a connector for "CombiProbe" for 4-bit system trace (STM). For details see "Prepare_PandaBoard_for_Offchip_Trace.pdf". This document is also helpful if you intend to build the trace converter yourself.

Helpful direct links showing pinout and connector type: http://www.lauterbach.com/frames.html?adetmmictor.html (see ETMv3, Connector 1) http://www.lauterbach.com/frames.html?adetmmipi60.html (see ETMv3) http://www.lauterbach.com/frames.html?adarmcombi.html (see 34-pin MIPI connector)

Lauterbach tool selection:
General tool recommendation for OMAP4430 can be found here: http://www.lauterbach.com/frames.html?pro/pro_omap4430.php?chip=OMAP4430

Required TRACE32 software version:
Currently there is an August 2010 version on the Lauterbach web which shall not be used for OMAP4430. End of February 2011 there will be a November 2010 version which is ok for most cases. Meanwhile use the update provided.

Known issues:
The X-Loader currently provided for the PandaBoard causes a debugger connection issue. The X-Loader sets bit 8 of CM_DIV_M6_DPLL_CORE register to 1 ("Force this clock to stay enabled even if there is no request"). Changing this to 0 allows a connection. Changing it to 1 after that still allows a connection.

OpenOCD
OpenOCD mainline includes preliminary support for Cortex-A9 and Pandaboard. See the OpenOCD homepage for instructions to checkout and build from source.

Invoke OpenOCD as: openocd -f tcl/interface/flyswatter.cfg -f tcl/board/ti_pandaboard.cfg replacing flyswatter.cfg with the appropriate config for your JTAG hardware.

The default configuration exposes 3 targets: one Cortex-A9 (core 0) and two Cortex-M3 cores. To connect to the second Cortex-A9 core, edit the following line in tcl/target/omap4430.cfg: target create $_TARGETNAME cortex_a9 -chain-position $_CHIPNAME.dap -coreid 0 changing -coreid 0 to -coreid 1. At present it is not possible to connect to both Cortex-A9 cores simultaneously.

What works

 * halt, single-step, resume
 * breakpoints and watchpoints
 * reading/writing memory
 * inspecting core/register state

All memory accesses (including md/mw commands and disassembly) execute through the debug AHB on the L3 interconnect; resources on the L2 interconnect currently can not be accessed. This includes ROM, local PRCM, and anything in the Cortex-A9 "private memory region" (snoop-control unit, global interrupt controller, timers and watchdogs).

TBD

 * debugging A9 cores simultaneously
 * accessing L2 memory resources
 * unify a8/a9 code

Debug clocking
The debugger may not be able to access the A9 processor cores due to an issue with omap4430 clocking. If your debugger can identify JTAG devices, e.g.: Info : 375 316 core.c:948 jtag_examine_chain_display: JTAG tap: omap4430.jrc tap/device found: 0x3b95c02f (mfg: 0x017, part: 0xb95c, ver: 0x3) but no Cortex-A9 target appears, you are probably running into this issue. Verify by connecting the debugger with no SD card inserted: if it now works, you're hitting this issue.

The current x-loader mainline includes a workaround.