How to setup MSP430 Launchpad in ubuntu









This will help you to set up MSP430 Launchpad in ubuntu…TI provides support only for windows.we will setup the toolchain,debugger and test ablink led c program.

First install the dependencies needed

$sudo apt-get install git-core gcc-4.4 texinfo patch libncurses5-dev
$ sudo apt-get install zlibc zlib1g-dev libx11-dev libusb-dev libreadline6-dev

Now download mspgcc compiler

git clone git://
cd mspgcc4
sudo sh

The build script will ask a number of questions.  Accept the default by pressing Enter for each question except “Do you want to start build right now?”  The proper response here is of course “yes”!

Download and install mspdebug the debugger

cd ..
git clone git://
cd mspdebug
sudo make install

Now make a blink.c program

/* Demo app to blink the red LED on the TI Launchpad */
#include <msp430x24x.h>
int main(void) {
 volatile int i;
// stop watchdog timer
 // set up bit 0 of P1 as output
 P2DIR = 0x01;
 // intialize bit 0 of P1 to 0
 P2OUT = 0x00;
// loop forever
 for (;;) {
 // toggle bit 0 of P1
 P2OUT ^= 0x01;
 // delay for a while
 for (i = 0; i < 0x6000; i++);

Now compile it

$ /opt/msp430-gcc-4.4.5/bin/msp430-gcc -oS -o blink.elf blink.c

Now we generated the elf or executable.use mspdebug to download the program to the board

$ sudo mspdebug rf2500
(mspdebug) prog blink.elf
Writing 104 bytes to fc00...
Writing  32 bytes to ffe0...
(mspdebug) run
Running. Press Ctrl+C to interrupt...

The red LED will be blinking right now…


4 thoughts on “How to setup MSP430 Launchpad in ubuntu

  1. Hm,
    sudo sh
    gives me

    Do you want to start build right now? (y/n) [n] y
    Running sh “/opt/msp430-gcc-4.4.5” “2.21” “” “build”
    –2012-07-04 21:01:00–
    Auflösen des Hostnamen » («…, 2001:638:208:ef1b:0:ff:fe00:4
    Verbindungsaufbau zu (||:80… verbunden.
    HTTP-Anforderung gesendet, warte auf Antwort… 404 Not Found
    2012-07-04 21:01:00 FEHLER 404: Not Found.

    The binutils version in (which says should be called) has to be changed to 2.21.1.

    But now I get a

    checking for gcc… no
    checking for cc… no
    checking for cl.exe… no
    configure: error: in `/home/pixel/launchpad/mspgcc4/build/binutils-2.21.1-build’:
    configure: error: no acceptable C compiler found in $PATH
    See `config.log’ for more details.
    sh “/opt/msp430-gcc-4.4.5” “2.21.1” “” “build” exited with status code 1.
    Failed to execute sh “/opt/msp430-gcc-4.4.5” “2.21.1” “” “build” at ./ line 248, line 9.

  2. Hi there, great instructions, everything went very smoothly except that in compiling, the msp43-gcc-4.4.5 directory is completely empty, so the compile command does not work. Any ideas on what may have gone wrong?Thanks

Leave a Reply

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

You are commenting using your 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