MSP430 on Fedora 16 Linux – eZ430-F2013

A few months ago, i came across a deal from Texas Instruments that let me get a free eZ430-F2013 development stick. Since i couldn’t resist the temptation of free gadgets, i immediately ordered one and then waited for it to turn up.. a month later…

If you haven’t seen the neat little proto kit, it comes as a USB dongle, not much bigger than a flash drive which consists of a USB debugger (the big bit) and a removable board that holds the F2013 micro controller, each pin broken out to a standard pitch header.



So when this thing finally arrived, (I’d forgotten all about it) I had a quick look and put it aside since i didn’t feel like installing yet another proprietary software package to be able to work with the device.

Having re-discovered the gadget the other day in a box from moving house, i decided to give it another go. Much to my satisfaction MSP-GCC came to the rescue!



Here are the steps i followed to get this thing working under Fedora 16 without the IAR embedded workbench stuff

    • Kernel Support – Under fedora 16, the device should show up as a USB serial device like /dev/ttyUSBx. Double check that the kernel module ti_usb_3410_5052 is loaded with lsmod. In the past, there were a few source changes that needed to be made for this module to recognise the eZ430-F2013 but Fedora 16 works out of the box.
    • MSP-GCC and GDB– Next, we have to install MSP-GCC (the compiler) and gdbproxy (the debugging software) mspdebug is a modern replacement for gdbproxy, with good support for the eZ430 system.
[important]yum install msp430-libc mspdebug[/important]
    • Hello World – Now we get to create a simple embedded version of a hello world application. create led-on.c and paste in the following source:

[important]#include <msp430x20x3.h>
int main (void) {
// Set P1.0 as an output
P1DIR = 1;
// Turn on the LED
P1OUT = 1;
return 0;

    • Compilation – Compile the test code using the following command:
[important]msp430-gcc -g led-on.c -o led-on.elf[/important]
    • Programming – Now we use mspdebug to load the program into flash on the MSP430 microcontroller and run it. You can either run up mspdebug and then issue the commands to load flash and run the app using mspdebug’s command line interface as follows:
[important][root@Optimus msp430]# mspdebug uif
MSPDebug version 0.19 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2012 Daniel Beer <>
This is free software; see the source for copying conditions.  There is NO

ti3410: warning: can't detach kernel driver: No such file or directory
TI3410 device is in boot config, setting active
Initializing FET...
FET protocol version is 10002000
Configured for Spy-Bi-Wire
Set Vcc: 3000 mV
Device: MSP430F20x3
Code memory starts at 0xf800
Number of breakpoints: 2

Available commands:
    =         delbreak  gdb       load      opt       reset     simio     
    alias     dis       help      locka     prog      run       step      
    break     erase     hexout    md        read      set       sym       
    cgraph    exit      isearch   mw        regs      setbreak  

Available options:
    color           gdb_loop        iradix          
    fet_block_size  gdbc_xfer_size  quiet           

Type "help <topic>" for more information.
Press Ctrl+D to quit.

(mspdebug) prog slowtimer.elf 
Writing  130 bytes to fc00 [section: .text]...
Writing   32 bytes to ffe0 [section: .vectors]...
Done, 162 bytes written
(mspdebug) run
Running. Press Ctrl+C to interrupt...[/important]

OR:you can tell mspdebug to program and run the code without having to enter the command line interface:

[important]mspdebug uif 'prog slowtimer.elf'[/important]
  • Done! how easy was that ;D – Now go and make your LED blink!

Leave a Reply

Your email address will not be published.