Setup Eclipse for ARM development for TI based boards

17 Feb


  • Debian system preinstalled. As at the time I’m writing this debian `stretch` is around the corner I’m using the RC3 netinstall x86 image to setup my plain debian virtual machine.
  • Virtual Box Hypervisor (currently version 5.1.22)

VBox Guest Additions

To ease development it is recommend to first install the virtual box guest additions. Simply insert the guest additions image file that is shipped with every version of virtual box and open a shell in the virtual machine:

apt-get install binutils make linux-headers-686
cd /media/cdrom
sudo sh
sudo reboot


Eclipse is offering a C/C++ bundle package which is called CDT. Get the newest version directly from the web page or get the Neon 3 release:

sudo apt-get install openjdk-8-jre openjdk-8-jdk libncurses5 build-essential
tar xpf eclipse-cpp-neon-3-linux-gtk.tar.gz
cd eclipse

After launching it is always useful to first use the inbuilt update function. Check “Help/Check for Updates”. After the installation of the current release Eclipse normally needs a restart.

The next step is to install additional debug tools like plugins. You can get more information <here>. Check “Help/Install new software” and “add” the GNU ARM Eclipse as a new site:

Depending on what you want to achieve with Eclipse you can choose the packages you like. I am using the “Cross Compiler” Addon for general C++ cross compilation support and the J-Link Debugging plugin.

Segger Jlink

Segger offers a debian install package. You can either get the current version directly from the page or use the following for version 6.14.
sudo dpkg -i JLink_Linux_V614h_i386.deb

Texas Instruments Drivers

As we like to access the UART ports offered by the XDS USB chip for debugging and flashing the appropriate drivers need to be installed first. The current version can always be downloaded on this TI page.

sudo apt-get install libc6:i386 libx11-6:i386 libasound2:i386 
libatk1.0-0:i386 libcairo2:i386 libcups2:i386 libdbus-glib-1-2:i386 
libgconf-2-4:i386 libgcrypt20:i386 libgdk-pixbuf2.0-0:i386 
libgtk-3-0:i386 libice6:i386 libncurses5:i386 libsm6:i386 liborbit2:i386
 libudev1:i386 libusb-0.1-4:i386 libstdc++6:i386 libxt6:i386 
libxtst6:i386 libgnomeui-0:i386 libusb-1.0-0-dev:i386 
libcanberra-gtk-module:i386 gtk2-engines-murrine:i386 unzip
chmod +x ti_emupack_setup_6.0.504.4_linux_x86_64.bin

This also enables you to use the XDS chip for debugging purposes. However I’m using the prior installed J-Link EDU from Segger and only need access to the UART port which enables the border link router feature.

If you like to read more about the XDS chip check out this PDF from TI.

When you connect the board to your system you should get something like this in `dmesg`:

sudo dmesg
 [ 1954.821450] usb 1-1: new high-speed USB device number 2 using ehci-pci
 [ 1955.146177] usb 1-1: New USB device found, idVendor=0403, idProduct=a6d1
 [ 1955.146179] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
 [ 1955.146179] usb 1-1: Product: Texas Instruments XDS100v3
 [ 1955.146180] usb 1-1: Manufacturer: TI
 [ 1955.146181] usb 1-1: SerialNumber: 06EXXXXX

This means the drivers aren’t loaded yet. Change to the installation folder that you supplied in the emupack setup and enter the `install_scripts` folder. You can either execute the shell script you’ll find in it or manually copy the .rules file to your local udev dir:

 sudo cp ~/ti/install_scripts/71-ti-permissions.rules /etc/udev/rules.d/

Now disconnect and reconnect the device and dmesg should show you something like:

sudo dmesg
 [ 4006.049359] usbcore: registered new interface driver usbserial
 [ 4006.049366] usbcore: registered new interface driver usbserial_generic
 [ 4006.049373] usbserial: USB Serial support registered for generic
 [ 4006.051720] usbcore: registered new interface driver ftdi_sio
 [ 4006.051730] usbserial: USB Serial support registered for FTDI USB Serial Device
 [ 4006.052904] ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected
 [ 4006.052945] usb 1-1: Detected FT2232H
 [ 4006.055797] usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0
 [ 4006.055822] ftdi_sio 1-1:1.1: FTDI USB Serial Device converter detected
 [ 4006.055838] usb 1-1: Detected FT2232H
 [ 4006.059789] usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB1

As you can see you now have access to two new tty devices (here ttyUSB0 and ttyUSB1). Source


There are different toolchains available that you can use. I’ll choose the GNU ARM embedded Toolchain available here. The latest version available at the time is the 2016 q3 update.

tar -xjvf gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2
ln -s gcc-arm-none-eabi-5_4-2016q3 /opt

Eclipse Projects

Check out a project that you like to compile via e.g. git. Second, use “File/Import” and select “C++” and “Existing Code as Makefile project” – if your project is built with make. Afterwards select the folder where you’ve checked out the project and select “Cross ARM GCC” from the list.

After the import you can edit the build management on your own.