The MSP430 gcc toolchain

Assuming an ubuntu machine install following packages and test them by building a simple led blinking program as listed below.

  • Install gcc-msp430, the GNU compiler collection for msp430 https://launchpad.net/ubuntu/+source/gcc-msp430 or https://www.ti.com/tool/MSP430-GCC-OPENSOURCE
    • sudo apt-get install gcc-msp430
  • Install msp430mcu, which ships specs files, headers and linker scripts for msp430 targets https://launchpad.net/ubuntu/+source/msp430mcu
    • sudo apt-get install msp430mcu
  • Install msp430-libc, which is a C library for msp430 devices https://launchpad.net/ubuntu/+source/msp430-libc
    • sudo apt-get install msp430-libc
  • Test tool-chain by compiling a simple program, which blinks two Leds
    • msp430-gcc -mmcu=msp430g2553 blinkled.c -o blinkled.elf
  • Blinkled.c:

If the build succeeds your tool-chain is ready. Next step is to flash the .elf to a device to see if it works.

Subscribe to get last updates.

×