A template for MSP430 firmware.
Latest commit 7d632df Mar 31, 2013 @ericevenchick ericevenchick Merge pull request #1 from omtinez/patch-1
Update Makefile, fixed typo
Failed to load latest commit information.


MSP430 Template



  • make
  • binutils-msp430
  • gcc-msp430
  • gdb-msp430
  • msp430-libc
  • msp430mcu
  • mspdebug
  • srecord
  • unix2dos


Packages for the MSP430 toolchain are available in the Ubuntu repositories. To fetch the required packages, run:

sudo apt-get install build-essential srecord binutils-msp430 gcc-msp430
gdb-msp430 msp430-libc msp430mcu mspdebug dos2unix

This will install the build toolchain and the mspdebug tool.

Writing and Building Firmware

  1. Clone the msp430-template repository (or fork it and clone your own repository).

    git clone git@github.com:uctools/msp430-template
  2. Modify the Makefile:

    • Set TARGET to the desired name of the output file (eg: TARGET = main)
    • Set SOURCES to a list of your sources (eg: SOURCES = main.c two.c three.c)
    • Set MCU to the MSP430 part number to build for (eg: MCU = msp430g2231)
  3. Run make

  4. The output files will be created in the 'build' folder



To flash a device using mspdebug, run mspdebug and specify a debugger. For the MSP430 Launchpad, the debugger is rf2500:

mspdebug rf2500

Note, you may need to run mspdebug as root.

In mspdebug, you can load and run the program:

(mspdebug) load build/main.hex
(mspdebug) run

Further support on using mspdebug is available on the mspdebug homepage and in the mspdebug manual.