This post brings you a way to debug Texas Instruments MSP-EXP430G2 Launchpad Development tool from Ubuntu Linux using MSPDebug tool. This tool provides source level debugging capability. Basically it supports MSP430 MCUs with JTAG and Spy Bi-Wire interface. It also supports simulation mode, which allows MSP430 code to be debugged without hardware. Another worth noted feature is reverse engineering support.
Hardware setup
The below shown is the MSP-EXP430G2 Launchpad.
The below commands and outputs shows how this USB debugger detected in Linux.
$ dmesg………………………………………..[ 4203.780954] usb 6-1: new full speed USB device using uhci_hcd and address 2[ 4204.204352] cdc_acm 6-1:1.0: This device cannot do calls on its own. It is not a modem.[ 4204.204358] cdc_acm 6-1:1.0: No union descriptor, testing for castrated device[ 4204.204422] cdc_acm 6-1:1.0: ttyACM0: USB ACM device[ 4204.206642] usbcore: registered new interface driver cdc_acm[ 4204.206645] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters[ 4204.263177] usbcore: registered new interface driver hiddev[ 4214.335699] /build/buildd/linux-2.6.35/drivers/hid/usbhid/hid-core.c: usb_submit_urb(ctrl) failed[ 4214.335735] generic-usb 0003:0451:F432.0001: timeout initializing reports[ 4214.336169] generic-usb 0003:0451:F432.0001: hiddev96,hidraw0: USB HID v1.01 Device [Texas Instruments Texas Instruments MSP-FET430UIF] on usb-0000:00:1d.1-1/input1[ 4214.336235] usbcore: registered new interface driver usbhid[ 4214.336240] usbhid: USB HID core driver
$ lsusb………………………….Bus 006 Device 002: ID 0451:f432 Texas Instruments, Inc. eZ430 Development Tool………………………….
$ lsmod | grep acmcdc_acm 14979 0
So the device node can be noted down as /dev/ttyACM0 from the above message.
Software installation and usage
Now it is time to install MSPDebug tool. Visit http://mspdebug.sourceforge.net/download.html to download the source code file in .tar.gz format.
Here is my console session to explain how I extracted, compiled and installed in Ubuntu Linux 10.10.
$ tar zxvf mspdebug-0.11.tar.g
$ cd mspdebug-0.11
$ make clean
$ make WITHOUT_READLINE=1
$ sudo make install
$ mspdebug rf2500Trying to open interface 1 on 007rf2500: warning: can’t detach kernel driver: Operation not permittedrf2500: can’t claim interface: Operation not permitted
But this command succeeded when run as root user. To fix this issue, the normal user (blackgod in my case) needs permission to use USB bus. So I created a udev rule for this device, which permists users belong to plugdev group to use this USB device. So ensure that your normal user is added to plugdev group (/etc/group).
ATTRS{idVendor}==”0451″, ATTRS{idProduct}==”f432″, MODE=”0660″, GROUP=”plugdev”
$ sudo restart udev (or) $ sudo /etc/init.d/udev restart
$ mspdebug rf2500Trying to open interface 1 on 002Initializing FET…FET protocol version is 30066536Configured for Spy-Bi-WireSending initial reset…Set Vcc: 3000 mVDevice ID: 0xf201Device: MSP430F2013Code memory starts at 0xf800Number of breakpoints: 1Available commands:= dis hexout opt reset stepbreak erase isearch prog run symcgraph gdb md read setdelbreak help mw regs setbreakAvailable options:color gdb_loop quietType “help <topic>” for more information.Press Ctrl+D to quit.(mspdebug)
hai karups,
i want to buy a MSPEXP430G2 launch pad…
in tamilnadu…frm where i can purchase that…
pls…..
urs
elango