Software Environment for a BeagleBoard XM with JTAG

Code Composer Studio

In my last blog post I described my rationale for buying a BeagleBoard XM and a compatible JTAG emulator – the XDS100v2. This post follows on from that and describes the steps required for setting up TI’s Code Composer Studio such that you can use the XDS100v2 with the BeagleBoard XM to find out what the board is doing.

The XDS100v2 probably works best with the Code Composer Studio (CCS) software – so the first step is to download and install it. There are a number of versions of CCS that can be used – but the general advice is to use version 4.2.3.00004 for 32 bit Windows. There is a newer version but this seems like a work in progress and it’s probably best to not ‘go against the grain’. I’ve not seen much evidence that CCS with the XDS works under Linux. As a result of this it’s quite likely that you’ll end up wanting both a Windows and Linux installation – I use Linux natively and run Windows in a VirtualBox OSE virtual machine – it seems to serve my purposes.

The latest versions of Code Composer Studio can be found here – I downloaded and installed the massive 1.1GB DVD image which is described as the ‘Latest production DVD image‘. However in order to access the download you need to fill out a ‘U.S. Government export approval’ online form and to access this you will need to sign in with a TI.com account. Whilst it’s a pain – the entire process can be completed within 10 minutes and doesn’t cost a penny – the slow part is waiting for the download to complete.

The downloaded image is in fact just a ZIP file with an EXE inside – I executed this and installed the ‘Custom’ version – removing support for items I didn’t intend to use such as ‘Code Generation’ and ‘Target Content’ – but if you have the disk space then installing everything will do no harm. If you haven’t deselected it – the installer will also conveniently install the USB drivers for your XDS100v2 emulator.

Once installed, execute the ‘Code Composer Studio v4′ desktop shortcut – if you’re not familiar with Eclipse it will start by asking you where you want your workspace to live. The workspace is just an area for your projects – I usually check the ‘set as default’ checkbox and click OK. The first time you start CCS it will detect that the software is unlicensed and bring up a dialog box – fortunately it is possible to obtain a free license for use with the XDS100v2. You can select the ‘Activate a License’ option and follow the prompts to generate a free license from TI. Once again you will need to use your TI.com account and agree to some more terms. If you do everything correctly you’ll end up with a ‘.lic’ file emailed to you – all you need to do is use the licensing dialog box to point to the location of your license file. Finally all the hassle is out of the way. There is more information on the installation and license process on this page of the TI wiki.

The next step is to set up CCS to make use of your XDS100v2 for the BeagleBoard XM. The following steps describe this process – but they are limited to providing basic access to the board – i.e. you will not be able to download programs into RAM and run them, but will be able to view processor registers, display RAM and step through source.

1. You first need to create a Target Configuration File which will describe the target you intend to connect to. You can do this by clicking File | New | Target Configuration File. Type in a suitable file name and click Finish. At this point you will see an editor allowing you to specify which device and emulator you wish to use. You may also notice that the BeagleBoard is not present in this list. To get around this I utilised an existing configuration found on the TI Forums here. Click on the ‘Source‘ tab and copy the contents of this file into the editor. Click Save and you’re done.

2. Connect the JTAG emulator to the board and the emulator to your PC. If you are using a virtual machine for CCS you must also give it access to your USB device – use the Devices | USB Devices menu in VirtualBox. If all goes to plan, Windows should detect and find suitable drivers for the XDS.

3. In order to launch your new target configuration click Target | Launch TI Debugger. If you have multiple target configurations you may need to use the View | Target Configurations menu to specify which one to use (Right click on the file and click ‘Launch Selected Configuration‘).

4. Turn on your BeagleBoard and then click Target | Connect Target. Wait a little while and you will see in the ‘Debug‘ window that you are connected. Use the ‘View‘ menu to view Memory, Registers and disassembly and the controls in the ‘Debug‘ window to start, stop, reset, step, etc.

You should now be able to connect to your board and find out what’s going on. With a little more work you should be able to perform source level debugging and download and run programs straight from CCS.

In my next post I will describe how to write some bare metal code that can be installed on the MMC card (as an MLO file) which will get executed as soon as the processor comes out of reset. We’ll also use CCS to demonstrate that it is correctly running. [© 2011 embedded-bits.co.uk]

, , , , , , , , , ,

About Andrew Murray

Andrew is an experienced commercial Linux developer with a first class degree in Software Engineering and is the founder of Embedded Bits Limited. His day-to-day role fulfils his passion for learning and provides him with plenty of embedded Linux experience including kernel and embedded applications development on a wide variety of platforms. He loves to talk about boot time reduction and has performed a number of presentations on the topic at technical conferences - he has also been successful in achieving sub-second cold boot on Linux based products. Feel free to drop him an email at amurray@embedded-bits.co.uk

6 Responses to “Software Environment for a BeagleBoard XM with JTAG”

  1. David August 5, 2011 at 11:01 am # Reply

    If you have any success with compiling and downloading bare metal programs we would love to know how you do it,

  2. Wes Odegard September 12, 2011 at 11:34 am # Reply

    I wanted to let you know you wrote a great article.

  3. Suraj September 9, 2012 at 5:50 am # Reply

    Hi Andrew,

    I am using beagleboard-xm with XDS100v2. I did the configuration as instructed. I am still getting error

    C64XP_0: Error connecting to the target: (Error -1178 @ 0x6D) Device functional clock appears to be off. Power-cycle the board. If error persists, confirm configuration and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 5.0.747.0)

    Any suggestion.

    Regards

    Suraj

Trackbacks/Pingbacks

  1. Embedded Bits» Blog Archive » Hardware Environment for a BeagleBoard XM with JTAG - July 10, 2011

    [...] the embedded world bit by bit« The Right Approach to Minimal Boot Times [ELCE Video]Software Environment for a BeagleBoard XM with JTAG »Hardware Environment for a BeagleBoard XM with JTAGBeagleBoard XMI recently decided to [...]

  2. Writing an MLO for a BeagleBoard XM | Embedded Bits - March 21, 2013

    [...] reboot the board and see what happens when we break into the board with the JTAG (Please see my last post for how to connect to the BeagleBoard XM with a JTAG device). MLO seen running inside Code Composer [...]

Leave a Reply