Wednesday, September 29, 2010

Launchpad msp430, mspgcc4 and Ubuntu

So after waiting a few months my Launchads finally showed up.

Great value, seems like they are worth the wait. A bit limited code wise, only 2KB of flash and 128B of RAM.

I'm hoping to be able to squeeze 1-wire bus code to read a DS1820 as well as some LCD driver code in there to do a small cheap temperature controller.

The default tools look windows only, but there are a number of guides around for how to put together a Linux based toolchain for the MSP430. Unfortunately they all rely on building the toolchain from sources.

The best one looks to be the one at HAD:

But there is a major shortcut. Someone has packaged mspgcc4 for Ubuntu.

It is slightly old, but works fine on 10.04

echo "deb karmic main" > /etc/apt/sources.list.d/msp430.list
sudo apt-get update
sudo apt-get install msp430-gcc msp430-gdb msp430-binutils msp430-libc 

I still had to download and compile mspdubug but that was quick and easy.

The LED blink example in the HAD article worked first go.


  1. Thanks for the post. Everything seems to work for me until I get to the following line:
    "sudo apt-get install msp430-gcc msp430-gdb msp430-binutils msp430-libc"
    My terminal spits out the following response:
    "Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Couldn't find package msp430-gcc"
    Any ideas? I have no idea why msp430-gcc wouldn't be there (I'm running Lucid Lynx).

  2. Hmm... I figured it out. Apparently I made a mistake when adding the ppa source - it didn't take the karmic ones and was looking for lucid alternatives.

  3. This is what I found, but it doesn't seem complete or even working: