Jump to content

Command line tools for MSP430F5529 launchpad under OsX

Recommended Posts


I've done a little programming on my MSP430 using CCS but that is about as far as my embedded experience goes. Despite this I'm interested in moving over to Visual studio code and using my own make files to flash software over to the MSP430 F5529 launchpad.

The easiest way to do this that I see is if there was a set of command line tools for cross-compilation and flashing that I could call from my makefile. Does this exist for OsX and if so could someone point me in the right direction?

I would also be interested in setting up debugging from Visual studio code which I  assume would entail talking to the launchpad via GDB. Does anyone have any suggestions on how to set this up?

 Thanks in advance!

Link to post
Share on other sites

I used the msp430-elf-gcc that is installed in CCS. That makes it more convenient to get updates to both the compiler and the libmsp430.so that you can use with mspdebug tilib.  It will save you from having to ping pong back and forth updating the firmware on your msp430f5529 launchpad if you switch between CCS and your VS code setup.

I tried to use the gdb client built into VS code. On linux however there is a bug that prevents me from interrupting the execution to pause, so it was useless to me.  I setup a makefile target called debug that launches mspdebug in one xterm and msp430-elf-gdb in another xterm.  This works well for me. I can use it from vs code or just straight from the command line.

I have another makefile target called 'install' that invokes mspdebug tilib 'prog $@' to install the .hex or .elf file into the msp430f5529 flash.

Link to post
Share on other sites

I cant find the actual msp430-elf-gcc file in the CCS installation but i downloaded the MSP430-GCC-OPENSOURCE compilers and that contains a msp430-elf-gcc which is used by the make files in the examples included with the open source gcc. Do you know if it is the same msp430-elf-gcc as the one included in CSS?

The make file generates an .out file but I'm lost on which of the included tools to use to flash that (or should it be a .hex file?) onto the Launchpad. Any suggestions?

A minumum working example of a make file that compiles an example file and flashes it onto the MSP430 F5529 launchpad would be much appreciated :)

Thanks in advance!

Link to post
Share on other sites

Sometimes the MSP430-GCC-OPENSOURCE is not exactly the same revision. The msp430f5529 is old in terms of the compiler. It is probably fine for what you are doing.

The mspdebug is the opensource programmer I use for msp430 chips.  https://github.com/dlbeer/mspdebug For the msp430f5529 launchpad you can use:

$ mspdebug tilib 'prog foo.out'

CCS also provides a gdb proxy program. I've used it but I find mspdebug more convenient.  I can run mspdebug on a raspberry pi, that is never going to happen with CCS.  If you have installed dslite that will allow you to upload. Look at how energia uses it.

Attached is a simple project I have for the msp430fr6989. You will have to change it for the msp430f5529.

$ unzip msp430fr6989.zip
$ cd msp430fr6989
$ source env.sh
$ make V=1 clean all blink.install


BTW: This zip has a .vscode/c_cpp_properies.json file I use for code indexing. You will have to change it for the msp430f5529

Edited by Rickta59
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...