Jump to content
Sign in to follow this  
AnttiST

Command line tools for MSP430F5529 launchpad under OsX

Recommended Posts

 Hi,

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!

Share this post


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.

Share this post


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!

Share this post


Link to post
Share on other sites
Posted (edited)

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

msp430fr6989.zip

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

Share this post


Link to post
Share on other sites

I did look at the CCS 9 zip download for OSX. It does contain a msp430-elf-gcc. You need to look harder for it. Install CCS and the msp430-elf-gcc and you will have all the command line tools you need.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×