TI MSP430 LaunchPad on Ubuntu 11.10

It took less than a week for my $4.30 MSP430 Launchpad to arrive after I ordered it from TI. Then, due to other priorities, it was collecting dust on a bookshelf until I finally found some time to try it out!

I have an Ubuntu 11.10 Virtualbox VM on my laptop so I planned to install mspgcc complier and toolkit on it. Don Bindner (KD0PGM) has put together his reflections on MSP430 microcontrollers on his homepage which came very handy.

The udev system needs to be made aware of the Launchpad, so adding this file: /etc/udev/rules.d/46-TI_launchpad.rules helps Ubuntu to recognize Launchpad:

ATTRS{idVendor}=="0451", ATTRS{idProduct}=="f430", MODE="660", GROUP="plugdev"
ATTRS{idVendor}=="0451", ATTRS{idProduct}=="f432", MODE="660", GROUP="plugdev"


sudo restart udev

(or, if on Debian: sudo /etc/init.d/udev restart)

and the system is ready to recognize the Launchpad. I also made sure that my login was in the plugdev group in /etc/group, so I’d have read and write access to /dev/ttyACM0 when the board is plugged in:

sudo addgroup mylogin plugdev

Then, I downloaded and installed mspgcc version 2012-04-06 from http://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=Install:fromsource

Make sure you have the following packages installed:

sudo apt-get install libncurses5-dev libtinfo-dev texinfo libreadline-dev

I followed the instructions on the above webpage. It took about 2 hours to download and build all required components. The script on the webpage also installs mspdebug which can be used for communicating with the LaunchPad board. The script has some typos so it didn’t work the first time – gdb build has failed as well as mspdebug build.

Troubleshooting was easy – the instruction has a typo referencing a missing patch; so I ran this patch instead:

cd gdb-7.2;  patch -p1<../msp430-gdb-7.2a-20111205.patch

The make went fine afterwards. But mspdebug build failed again – it didn’t like readline – so I built it without gnu readline support:


Voila! Now testing with ‘mspdebug rf2500’…. and epic fail. The mspdebug couldn’t connect to the LaunchPad via USB whatever I tried. I’m guessing the reason was that my Ubuntu 11.10 was running in a VM and USB layer in VM doesn’t work fully up to specs. After googling I came across posts of other people who couldn’t connect to Launchpad from within a VM. So I installed mspgcc on my old Asus EEE 4G with Debian Squeeze on it instead.

When installing on Debian Squeeze, gdb build failed with an error ‘ld -lz cannot find’. This was quickly fixed by installing zlib1g-dev and other missing dependencies:

sudo apt-get install libncurses5-dev texinfo libreadline-dev  zlib1g-dev

All done! Again, trying ‘mspdebug rf2500’ and…. bingo!

pc@pc:~$ mspdebug rf2500
Trying to open interface 1 on 002
 Initializing FET...
 FET protocol version is 30394216
 Configured for Spy-Bi-Wire
 Set Vcc: 3000 mV
 Device ID: 0x2553
 Device: MSP430G2553
 Code memory starts at 0xc000
 Number of breakpoints: 2

I wrote a simple CW Beacon program for TI MSP430 which I will post in the next posting.

About va3paw
Ham radio enthusiast, software developer

2 Responses to TI MSP430 LaunchPad on Ubuntu 11.10

  1. Rob Staff says:

    I work with ubuntu as well and its been a pain to setup the launchpad on it. All kinds of issues popped up with the drivers and I just couldn’t get it to work until I saw your post and a few others. Now I am finally programming using a pretty cool MSP430 tutorial i found online for the launchpad. Thanks a lot for the information, saved my bacon.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: