ez430 - MSP430 USB Development Tool under Linux

introduction

Texas Instruments offers a ultra low-cost USB-based development tool for their MSP430 series. It retails for 20$ at TI Online Store or ~40CHF from Farnell. The Stick is delivered in a DVD-style casing with drivers and a IAR Kickstart development IDE. The hardware is the size of an USB Memorystick (in fact TI obviously used a generic Memorystick casing for saving costs) and consist of two pieces. The USB-JTAG debugging interface and an target board equipped with a TI MSP430F2013 for out-of-the-box development. Both parts are connected via a 4pin 2mm pin header. Schematics for both boards can be found in the ez430 user guide.

installing the hardware

The USB-JTAG adapter is based on a TI MSP430F1612, USB connectivity is provided by a TI TUSB3410 USB-serial converter chip. A driver support for Linux is included in kernel 2.6.20 and probably even older versions, but I haven't verified this. After plugging in the device dmesg gives the following output:
[...]
usb 2-1.1: new full speed USB device using uhci_hcd and address 8
usb 2-1.1: ep0 maxpacket = 8
usb 2-1.1: default language 0x0409
usb 2-1.1: new device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1.1: Product: MSP-FET430UIF JTAG Tool
usb 2-1.1: Manufacturer: Texas Instruments
usb 2-1.1: SerialNumber: TUSB34102F518282E658FF0D
usb 2-1.1: uevent
usb 2-1.1: usb_probe_device
usb 2-1.1: configuration #1 chosen from 2 choices
usb 2-1.1: adding 2-1.1:1.0 (config #1, interface 0)
usb 2-1.1:1.0: uevent
ti_usb_3410_5052 2-1.1:1.0: usb_probe_interface
ti_usb_3410_5052 2-1.1:1.0: usb_probe_interface - got id
ti_usb_3410_5052 2-1.1:1.0: TI USB 3410 1 port adapter converter detected
ti_usb_3410_5052: probe of 2-1.1:1.0 failed with error -5
usb 2-1.1:1.0: uevent
usb 2-1.1: device_add(2-1.1:1.0) --> -5
drivers/usb/core/inode.c: creating file '008
Notice: Your output may vary regarding different usb device names.
The problem results from a wrong USB device configuration selected. You can manually fix this by:
# echo "2" > /sys/bus/usb/devices/2-1.1/bConfigurationValue
Afterwards the seriel interface should be recognized and a USB serial device created:
usb 2-1.1: adding 2-1.1:2.0 (config #2, interface 0)
usb 2-1.1:2.0: uevent
ti_usb_3410_5052 2-1.1:2.0: usb_probe_interface
ti_usb_3410_5052 2-1.1:2.0: usb_probe_interface - got id
ti_usb_3410_5052 2-1.1:2.0: TI USB 3410 1 port adapter converter detected
usb 2-1.1: TI USB 3410 1 port adapter converter now attached to ttyUSB0
The following udev rules automate this:
SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0451", SYSFS{idProduct}=="f430", SYSFS{bNumConfigurations}=="2", SYSFS{bConfigurationValue}=="1", RUN+="/bin/sh -c 'echo 2 > /sys%p/device/bConfigurationValue'"
Notice: I am not very familiar with udev, so their might be, far better solutions for this problem.
Now we have a serial device we can use for controlling the USB FET.

msp430-gdbproxy

There is a GDB remote proxy available for windows and linux. You can find more information and downloads on: http://mspgcc.sf.net. Unfortunately Texas Instruments prohibits full disclusore of their protocol, so the proxy depends on a closed-source HAL library.

You need following files: libHIL.so libMSP430.so msp430-gdbproxy

Starting msp430-gdbproxy will result in the following error message:

./msp430-gdbproxy: error while loading shared libraries: libMSP430.so: cannot open shared object file: No such file or directory
You have to modify the Environment variable LD_LIBRARY_PATH to look in the current directory for the linked libraries.
$ export LD_LIBRARY_PATH=.
Another possibility would be placing the libraries in a system path for libs like /usr/local/lib. But I don't like this approach because it trashes your filesystem with files the packet managment system doesn't keep track of.
Now you can start msp430-gdbproxy with:
./msp430-gdbproxy --port=2000 msp430 --spy-bi-wire /dev/ttyUSB0

MSP430 toolchain

to be continued
nicholas preyss - 28.04.2007