MSP430 for OS X

I collected some information on how to setup the MSP430 toolchain for Mac OS X


The easy way

A new google Code project provides all the files you need to get your launchpad working with OS X. Check out
http://code.google.com/p/osx-launchpad/

Another easy way for all Arduino user

There's also a port of the Arduino IDE out there for the Launchpad. Check out
https://github.com/energia/Energia/wiki/Getting-Started Install the driver and the Energia program as mentioned there, and have fun.

Just remember two things:
- Trying to upload a sketch after using the serial monitor (may?) result in a "usbutil: unable to find a device matching ..." error - just briefly unplug the launchpad before uploading.
- And, most important, use the HW UART and not the SW UART jumper settings on the launchpad, otherwise the serial connection won't work (uploading is still possible).

And, by the way, if the launchpad hasn't enough pins for you, the MSP430G2553 is also available in a 28pin smd-package with 24 usable pins. It could be programmed by connecting the RST/TEST/VCC/GND Spy-By-Wire interface of the launchpad with the external micro-controller. No bootloader needed, works just like the inserted micro-controller at the launchpad.
Other Spy-By-Wire capable MSP430s should be programmable in the same way, especially the whole value line:
http://www.ti.com/lsds/ti/microcontroller/16-bit_msp430/8-bit_value_line.page?DCMP=Value_Line&HQS=Other+OT+msp430value.


Install MSPGCC

$ git clone git://mspgcc4.git.sourceforge.net/gitroot/mspgcc4/mspgcc4
$ cd mspgcc4 && perl buildgcc.pl
I used the default values for the different settings (except for insight, which failed to compile on my machine). You might want to set the installation path to /opt/local since MacPorts also installs all its packages there and the path is already included in your path variable.
There are binary packages available at http://sourceforge.net/projects/mspgcc4/files/

Install MSPdebug

Install libusb and libelf using MacPorts
$ sudo port install libusb
$ sudo port install libusb-compat
$ sudo port install libelf

Download MSPdebug from http://mspdebug.sourceforge.net/ and unpack it.
$ make
$ sudo make install


Using the TI LaunchPad with OS X.

This seems to be a very tricky task. Although there are some reports on the internet that some made the serial connection work, I didn't manage to do so.
To at least be able to program your MSPs, follow the instructions at http://mspdebug.sourceforge.net/faq.html#rf2500_osx which worked for me.

Be aware that mspgcc does not support the MSP430G2231 MCU that comes with the launchpad. However, simple programs seem to work with the msp430x2012 setting.


Running mspdebug

To connect mspdebug with the LaunchPad or ez430 programmer, enter the following command
mspdebug rf2500
If you want to use the MSP430 USB-Debug-Interface
mspdebug uif
If you are using an MSP-FET430UIF with a usual MSP430 (e.g., MSP430F249) then you need to provide the serial port to connect to (-d /dev/tty.TIVCP3410410) and set the protocol to JTAG (-j).
mspdebug -d /dev/tty.TIVCP3410410 -j
Once you're on the mspdebug console, you can interrupt your program, step through, inspect the memory, erase the program memory and flash new code to it (see http://mspdebug.sourceforge.net/manual.html for detailed information).


Blinking LED program

To test your toolchain, you can flash your MSP430 with a simple BlinkLED program. Here's how it works:

Run make on the console
Start mspdebug Flash the new program by entering prog main.elf Start the program with run To interrupt the program flow just press Ctrl-C
You can issue commands now. If you want to quit the debugger just type exit. When the debugger quits, it resets the MCU and the program starts over.


Links

http://osx-launchpad.blogspot.com/


Sources

http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_Mac_OS_X http://mspdebug.sourceforge.net/ http://mspgcc4.sourceforge.net/ http://losinggeneration.homelinux.org/2010/07/02/msp430-launchpad-on-linux/ http://www.43oh.com/forum/
Attachments:
File Description File size Downloads Last modified
BlinkLed.zip MSP430 BlinkLED 2 kB 2696 2010-11-03 14:16

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.