Programming with the MSP430!

With the advent of arduino the Atmega328 by Microchip has been a staple of electronics hobbyists. However, there are other microcontroller (MCU) options available on the market, such as the MSP430 by Texas Instruments (TI).

The major advantage of the Atmega328 is the arduino ecosystem. TI has also released their own development kits called LaunchPad. One of the first was for the MSP430. You can purchase an MSP430 development LaunchPad called MSP-EXP430G2 for 10 dollars from TI.

Currently TI only supports the windows platform for this particular development board in their Code Compiler Studio. However, their are other options if you want to use this board on a Mac or Linux machine. One such option is Energia. here are the steps I used to program my MSP-EXP430G2 LaunchPad on a Mac running High Sierra 10.13.2.

  1. Download and install Energia
  2. Download the LaunchPad CDC drivers. The link on the Energia website resolves into a 404 but the link on their github page works.
  3. Since sierra Mac system will block and system extensions. You’ll need to go and update your Security & Privacy System Preferences to allow for the extension. When I loaded the drivers I did not accept or change my settings immediately. You can go into your Security & Privacy settings and towards the bottom will be a message “System software from __ was blocked from loading” with an allow button next to it, do you can allow at later time.
  4. Load up Energia. It is a fork of arduino so it looks identical. Under Tools, make sure you select the correct LaunchPad. For the MSP-EXP430G2 there are a variety of board options so make sure you select the correct version.
  5. Connect your board through USB. Under the Tools menu make sure you are programming to the correct port.
  6. Energia comes with a lot of examples! Under the File menu select Examples. A good first one to try out is the Blink program under 01. Basic menu header.
  7. Compile and upload the program!

Troubleshooting

One issue I ran into occurred when trying to compile and example. Energia would always fail with an error message that included the follow:

failed MSpanList_Insert 0x30d000 0x32c44e5715c 0x0
fatal error: MSpanList_Insert

This failure seems to be Mac specific and comes from arduino itself .There is an open issue on Energia github to port this fix over. However, the fix is in a beta branch currently. The next easiest solution is to swap out the arduino builder file. You can get the updated one here. For me this file was in Applications/Energia/Contents/Java.

Your milage may vary and you might run into some issues, but that is ok! If you get completely stuck at any point there is an active community around Energia. On their forum you can ask any questions you might have on your current issue.

Happy Programming!

Comments