See [[OMAP3530_ICEPICK|ICEPICK configuration page]] for more details about how OMAP3 JTAG hardware needs to be configured.

See [[OMAP3530_ICEPICK|ICEPICK configuration page]] for more details about how OMAP3 JTAG hardware needs to be configured.

Line 53:

Line 53:

=JTAG hardware=

=JTAG hardware=

−

For BeagleBoard JTAG debugging, there are some HW interfaces available. Several can be found on the [http://focus.ti.com/dsp/docs/dspfindtoolswresults.tsp?sectionId=3&tabId=1620&familyId=1526&toolTypeId=12&go=Go TI tools directory].

+

For BeagleBoard JTAG debugging, there are some HW interfaces available. Each is covered below.

+

+

==TinCanTools Flyswatter2==

+

+

[http://www.tincantools.com/ TinCanTools] has a new JTAG debugger at [http://www.tincantools.com/product.php?productid=16153&cat=0&page=1&featured Flyswatter2] that has support for OpenOCD and ARM Cortex A8 processors: OMAP3530 BeagleBoard and DM3730 BeagleBoard-xM. The Flyswatter2 is 5 to 10 times faster than the original Flyswatter.

+

+

They also have a [http://www.tincantools.com/product.php?productid=16154&cat=251&page=1 ARM20TI14 JTAG Adapter]. This JTAG adapter board works with the BeagleBoard and BeagleBoard-xM.

+

+

The Flyswatter2 can be used with [[BeagleBoardJTAG#Open_source_JTAG_software|OpenOCD]] (Beagle (OMAP3xx) support is complete).

==TinCanTools Flyswatter==

==TinCanTools Flyswatter==

−

[http://www.tincantools.com/ TinCanTools] is currently working at [http://www.tincantools.com/product.php?productid=16134&cat=0&page=1&featured Flyswatter] support for OpenOCD for OMAP3530. They also have a [http://tincantools.com/product.php?productid=16144 BeagleBoard Adapter Kit].

+

[http://www.tincantools.com/ TinCanTools] has a working JTAG debugger at [http://www.tincantools.com/product.php?productid=16134&cat=0&page=1&featured Flyswatter] that has support for OpenOCD and the OMAP3530 (ARM Cortex A8). They also have a [http://tincantools.com/product.php?productid=16144 BeagleBoard Adapter Kit].

Flyswatter can be used with [[BeagleBoardJTAG#Open_source_JTAG_software|OpenOCD]] (Beagle (OMAP3xx) support under development).

+

Flyswatter can be used with [[BeagleBoardJTAG#Open_source_JTAG_software|OpenOCD]] (Beagle (OMAP3xx) support is complete).

−

'''Attention''': If you use [http://tincantools.com/product.php?productid=16144 BeagleBoard Adapter Kit], make sure you plug the JTAG adapter the correct way. There are several possible ways, though. See [http://www.tincantools.com/images/D/Fly%2BBeagle-800x391.JPG?1229714946602 connection picture] how to do it the right way (in contrast to the picture EMU0 & EMU1 jumpers at JTAG adapter should be both at 1-2 position (touching J2)).

+

'''Attention''': If you use [http://tincantools.com/product.php?productid=16144 BeagleBoard Adapter Kit], make sure you plug the JTAG adapter the correct way. There are several possible ways, though. See [http://www.tincantools.com/images/D/Fly%2BBeagle-800x391.JPG?1229714946602 connection picture] how to do it the right way (in contrast to the picture EMU0 & EMU1 jumpers at JTAG adapter should be both at 1-2 position (touching J2) because EMU0 and EMU1 must be set in order for the ICEpick JTAG TAP router within the DM37x to be the only device exposed after power on, which is what OpenOCD expects to see).

==BDI 2000==

==BDI 2000==

Line 155:

Line 164:

===BDI config===

===BDI config===

−

The [ftp://78.31.64.234/bdigdb/config/arm/cortex-a8/ BDI config files] might help getting OpenOCD to work with BeagleBoard.

+

The [ftp://94.230.212.16/bdigdb/config/arm/cortex-a/ BDI config files] might help getting OpenOCD to work with BeagleBoard.

This configuration assumes the "default" EMU 0 and 1 configuration (both not connected/high state). In this EM setup at first only one TAP is exported. A set of commands must be run on the first tap (embedded ICE)

This configuration assumes the "default" EMU 0 and 1 configuration (both not connected/high state). In this EM setup at first only one TAP is exported. A set of commands must be run on the first tap (embedded ICE)

Texas Instruments (TI) offers a set of JTAG emulators for debugging Beagle Board, and related, targets. These include the low-cost XDS100v2, and the higher-priced XDS510 et al. In addition, there is en Eclipse-based IDE called Code Composer Studio (ccs). As of early 2011, the latest version is [http://processors.wiki.ti.com/index.php/CCSv5_Getting_Started_Guide ccsv5], and it can be run on either a [http://processors.wiki.ti.com/index.php/Linux_Host_Support Linux host] or a Windows host. Debugging is possible in both [http://processors.wiki.ti.com/index.php/Linux_Debug_in_CCSv5 run-mode and stop-mode].

+

+

XDS510, BlackHawk USB560 and CCSV4 (code composer studio) can be used to debug OMAP3503/15/25/30.

+

+

Some of these tools can be found on the [http://focus.ti.com/dsp/docs/dspfindtoolswresults.tsp?sectionId=3&tabId=1620&familyId=1526&toolTypeId=12&go=Go TI tools directory].

Linux Aware debugging using CCSV4 is described in [http://tiexpressdsp.com/index.php?title=Linux_Aware_Debug CCSV4 Linux Aware Debugging]. CCSV4 is available for download from [http://tiexpressdsp.com/index.php/Category:Code_Composer_Studio_v4 CCSV4].

+

+

====CCSV4 Current Status ====

+

* CCSV4 is a Windows based application, which means that Linux Kernel Code compiled an a Linux machine must be shared using NFS for SAMBA.

+

* Although CCSV4 is based on Eclipse, it will not work on Linux as there are currently no Linux Drivers for the JTAG Emulators. TI are developing Linux Drivers, but have not disclosed a release date

+

* CCSV4 is based on Eclipse V3.1.0, which means that many of the features added through Eclipse based V3.4.2 are missing

+

* TI are updating CCSV4 to use Eclipse V3.4.2, but have not disclosed a release date

+

* When TI release CCSV4 using Eclipse V3.4.2, I expect TI to release a CCSV4 plugin for Code Sourcery

+

* TI have produced a very good debugger, but there are still several bugs that TI are actively working to resolve and should be released in an update shortly. Most of these bugs are not show stoppers, but merely operational annoyances.

+

* Blackhawk have released a $99 [http://www.blackhawk-dsp.com/products/usb100.aspx USB100], which is compatible with CCSV4. Please refer to [http://www.tiexpressdsp.com/index.php/XDS100 XDS100] about compatibility. Update: While CCSV4 does support XDB100, XDS100 does not yet support CortexA8 or C64X+. So, 4.02 (due in 11/09) will have XDS100 beagleboard support.

==PEEDI==

==PEEDI==

Line 191:

Line 218:

The PEEDI package includes also an PEEDI to TI14 adapter and an TI20 to TI14 adapter.

The PEEDI package includes also an PEEDI to TI14 adapter and an TI20 to TI14 adapter.

−

==ARM RealView ICE==

+

===Linux Kernel Aware Debugging using PEEDI Emulator===

+

* For Linux Aware debugging, PEEDI is a great solution. Here is what you will need:

* In the Console Window, type "target remote <xxx.xxx.xxx.xxx>:2000, where <xxx.xxx.xxx.xxx> is the BeagleBoard IP address

+

* Next, type "ni". The Source Window will load /init/main.c and highlight a line in start_kernel

+

* Step through the code, or enter breakpoints and run the program.

+

+

====Thread List====

+

* If you are doing multi-threaded debugging, this feature is invaluable

+

* The PEEDI config file (OMAP3530.CFG) must be setup to read this info from your kernel

+

* The information needed by Insight GDB is in the [OS_ARM_LINUX_v26] section

+

* This information is obtained from the Insight GDB Console Window

+

* print &init_task ; BASE

+

* print &((struct task_struct*)0)->tasks.next ; NEXT

+

* print &((struct task_struct*)0)->pid ; PID

+

* print &((struct task_struct*)0)->comm ; NAME

+

* print &((struct task_struct*)0)->stack ; second CONTEXT arg

+

* print &((struct thread_info*)0)->cpu_context ; third CONTEXT arg

+

+

For Linux Kernel v2.6.29, this section looks something like this:

+

* BASE = 4, 0xC066B110

+

* NEXT = 4, -0x1B8

+

* PID = 4, 0x1E4

+

* NAME = 16, 0x2DB

+

* CONTEXT = 10*4, 0x4, 0x1C

+

+

Note: the BASE address will most definitely be different to the one provided here, but the other values should be similar.

+

+

Ronetix technical support is excellent and they added features like the Thread List in just over a week. When I reported what seemed like a bug, they fixed most of them in just a few days. Overall, I am very impressed with the PEEDI emulator and it works great with the BeagleBoard. PEEDI is certainly the most responsive emulator I have worked with and what I like most is it is one of the few that works natively within Linux.

+

+

==ARM Development Studio 5 (DS-5™)==

+

+

The reference software development suite from ARM, [http://www.arm.com/ds5 DS-5], supports JTAG-based debug and ETM trace with Linux kernel awareness on OMAP34XX/OMAP35XX/OMAP36XX/OMAP44XX and other ARM-based devices. Its target connection is called [http://www.arm.com/dstream DSTREAM], and is spec'd to provide reliable and fast run-control debug and 4GB of non-intrusive instruction trace.

−

The new release of software (3.3) for the [http://www.bluewatersys.com/blog/?p=71 ARM RealView ICE] supports Texas Instruments’ range of OMAP3 processors.

+

For ease of use for Beagle board users, it even provides BB and BB xM [http://www.arm.com/products/tools/software-tools/ds-5/ds-5-downloads.php Linux distribution examples].

=Linux kernel debugging=

=Linux kernel debugging=

−

If you like to debug Linux kernel (with one of the above JTAG tools?) using GDB have a look to [[DebuggingTheLinuxKernelUsingGdb|debugging Linux kernel using GDB]] article.

+

If you like to debug Linux kernel (with one of the above JTAG tools?) using GDB have a look to [[Debugging The Linux Kernel Using Gdb]] article.

The 14-pin TI JTAG connector that is used on BeagleBoard is supported by a large number of JTAG emulation products and has been tested using Lauterbach, Green Hills, Spectrum Digital XDS510USB+ and TI XDS560 emulation pods. Note that it will not work with the Spectrum Digital XDS510USB (non-plus) as it does not support a target with 1.8V JTAG.

Open source JTAG software

It would be very interesting to get the JTAG working with open source tools. The main open source JTAG software is OpenOCD. See Beagle board OpenOCD page about status and usage of OpenOCD for Beagle.

JTAG hardware

For BeagleBoard JTAG debugging, there are some HW interfaces available. Each is covered below.

TinCanTools Flyswatter2

TinCanTools has a new JTAG debugger at Flyswatter2 that has support for OpenOCD and ARM Cortex A8 processors: OMAP3530 BeagleBoard and DM3730 BeagleBoard-xM. The Flyswatter2 is 5 to 10 times faster than the original Flyswatter.

They also have a ARM20TI14 JTAG Adapter. This JTAG adapter board works with the BeagleBoard and BeagleBoard-xM.

The Flyswatter2 can be used with OpenOCD (Beagle (OMAP3xx) support is complete).

TinCanTools Flyswatter

In case you like to order Flyswatter and Adapter Kit international, here an example for Europe (Germany):

Flyswatter: US-$ 49.95

BeagleBoard Adapter Kit: US-$ 18.00

International shipping: US-$ 27.00 (select USPS, it's the cheapest!)

Video about using Flyswatter with BeagleBoard

Sum: US-$ 94.95 => EUR 65.28 + EUR 8.76 VAT (Germany) = EUR 74.04

Flyswatter can be used with OpenOCD (Beagle (OMAP3xx) support is complete).

Attention: If you use BeagleBoard Adapter Kit, make sure you plug the JTAG adapter the correct way. There are several possible ways, though. See connection picture how to do it the right way (in contrast to the picture EMU0 & EMU1 jumpers at JTAG adapter should be both at 1-2 position (touching J2) because EMU0 and EMU1 must be set in order for the ICEpick JTAG TAP router within the DM37x to be the only device exposed after power on, which is what OpenOCD expects to see).

BDI 2000

Example

The BDI2000 appears to work with the omap35xx.cfg and regOMAP3500.def files that come with the BDI hardware. I had to modify the 10-pin cable so that the BeagleBoard JTAG header matched the BDI target A connector:

BDI config

This configuration assumes the "default" EMU 0 and 1 configuration (both not connected/high state). In this EM setup at first only one TAP is exported. A set of commands must be run on the first tap (embedded ICE)
to enable access to the core:

Lauterbach

XDS100, XDS510, USB560 and CCSV4

Texas Instruments (TI) offers a set of JTAG emulators for debugging Beagle Board, and related, targets. These include the low-cost XDS100v2, and the higher-priced XDS510 et al. In addition, there is en Eclipse-based IDE called Code Composer Studio (ccs). As of early 2011, the latest version is ccsv5, and it can be run on either a Linux host or a Windows host. Debugging is possible in both run-mode and stop-mode.

XDS510, BlackHawk USB560 and CCSV4 (code composer studio) can be used to debug OMAP3503/15/25/30.

BeagleBoard Linux Kernel Aware Debugging using CCSV4

CCSV4 Current Status

CCSV4 is a Windows based application, which means that Linux Kernel Code compiled an a Linux machine must be shared using NFS for SAMBA.

Although CCSV4 is based on Eclipse, it will not work on Linux as there are currently no Linux Drivers for the JTAG Emulators. TI are developing Linux Drivers, but have not disclosed a release date

CCSV4 is based on Eclipse V3.1.0, which means that many of the features added through Eclipse based V3.4.2 are missing

TI are updating CCSV4 to use Eclipse V3.4.2, but have not disclosed a release date

When TI release CCSV4 using Eclipse V3.4.2, I expect TI to release a CCSV4 plugin for Code Sourcery

TI have produced a very good debugger, but there are still several bugs that TI are actively working to resolve and should be released in an update shortly. Most of these bugs are not show stoppers, but merely operational annoyances.

Blackhawk have released a $99 USB100, which is compatible with CCSV4. Please refer to XDS100 about compatibility. Update: While CCSV4 does support XDB100, XDS100 does not yet support CortexA8 or C64X+. So, 4.02 (due in 11/09) will have XDS100 beagleboard support.

PEEDI

PEEDI JTAG/BDM Emulator and Flash Programmer of Ronetix supports OMAP3. A configuration file for the Beagleboard can be found here: omap3530.cfg

PEEDI has a built-in support for GNU gbd based debuggers and a built-in Flash Programmer.
The Flash Programmer is capable to program:

Launching the Insight Debugger

In the Console Window, type "target remote <xxx.xxx.xxx.xxx>:2000, where <xxx.xxx.xxx.xxx> is the BeagleBoard IP address

Next, type "ni". The Source Window will load /init/main.c and highlight a line in start_kernel

Step through the code, or enter breakpoints and run the program.

Thread List

If you are doing multi-threaded debugging, this feature is invaluable

The PEEDI config file (OMAP3530.CFG) must be setup to read this info from your kernel

The information needed by Insight GDB is in the [OS_ARM_LINUX_v26] section

This information is obtained from the Insight GDB Console Window

print &init_task ; BASE

print &((struct task_struct*)0)->tasks.next ; NEXT

print &((struct task_struct*)0)->pid ; PID

print &((struct task_struct*)0)->comm ; NAME

print &((struct task_struct*)0)->stack ; second CONTEXT arg

print &((struct thread_info*)0)->cpu_context ; third CONTEXT arg

For Linux Kernel v2.6.29, this section looks something like this:

BASE = 4, 0xC066B110

NEXT = 4, -0x1B8

PID = 4, 0x1E4

NAME = 16, 0x2DB

CONTEXT = 10*4, 0x4, 0x1C

Note: the BASE address will most definitely be different to the one provided here, but the other values should be similar.

Ronetix technical support is excellent and they added features like the Thread List in just over a week. When I reported what seemed like a bug, they fixed most of them in just a few days. Overall, I am very impressed with the PEEDI emulator and it works great with the BeagleBoard. PEEDI is certainly the most responsive emulator I have worked with and what I like most is it is one of the few that works natively within Linux.

ARM Development Studio 5 (DS-5™)

The reference software development suite from ARM, DS-5, supports JTAG-based debug and ETM trace with Linux kernel awareness on OMAP34XX/OMAP35XX/OMAP36XX/OMAP44XX and other ARM-based devices. Its target connection is called DSTREAM, and is spec'd to provide reliable and fast run-control debug and 4GB of non-intrusive instruction trace.