Jump to content
Sign in to follow this  
yyrkoon

msp430( Launchpad v1.5 ) compiler

Recommended Posts

I thought there was a recent discussion as to the state of compilers for the MSP430's . . . but I can not seem to find that discussion.

 

So, my question is simply, which is the best compiler for the MSP430 v1.5 launchpad ? Specifically, I'll be targeting the msp430g2553 for a project we have in mind, Also, I have no interest in CCS . . .only gcc.

 

So far I've set myself up using what I know, which was Energia's toolchain from 2013 ( 09 i guess it is ? ).

 

EDIT:

 

Additionally, this time around I may opt for Linux cli tools . . . depends on how much resistance I meet, with a given toolchain.

Share this post


Link to post
Share on other sites

yeah you got it.  The mspgcc that comes with Energia is solid for G2553 work.  Old compiler, unsupported, but works great.

Works fine under Linux too ? I seem to recall people having the odd problem with it, but maybe I'm thinking of the other gcc compiler ?

Share this post


Link to post
Share on other sites

Works fine under Linux too ? I seem to recall people having the odd problem with it, but maybe I'm thinking of the other gcc compiler ?

Works great under Linux, never heard of any issues with it.  Yes you may be thinking of the RedHat-developed msp430-elf-gcc compiler although TI releases the binary builds of that these days with patches and all.

Share this post


Link to post
Share on other sites

Works great under Linux, never heard of any issues with it.  Yes you may be thinking of the RedHat-developed msp430-elf-gcc compiler although TI releases the binary builds of that these days with patches and all.

Sweet, thanks. Now all I have to do is figure out how to "configure" the toolchain from the command line - heh. make to the rescue probably ;) I wonder if anyone on the forums here has a set of generic make files, etc . . .

Share this post


Link to post
Share on other sites

Paul (disclaimer: he's from Rowley, a company selling compilers) did some comparison between mspgcc, IAR und their own compiler back in 2004. mspgcc was the worst. I wonder what the result would be today.

 

https://www.embeddedrelated.com/showthread/msp430/10674-1.php

 

In 2014 another guy compared IAR, GCC, Code Composer, Rowley, and a couple of others:

 

http://embeddedgurus.com/stack-overflow/2010/02/is-gcc-a-good-compiler/#comment-208456

 

I looked at the output of `msp430-gcc -O2 -S *.c`. Even though my simple C code looked pretty optimized, it generated indirect addressing for a destination (e.g. mov #0, @r12). I'm sure the generated binary is correct, but the wrong syntax causes concern.

Share this post


Link to post
Share on other sites

The compiler that comes with Energia right now msp430-gcc (version 4.6.3) has a fairly small libc. Unfortunately, copyright issues prevent it from ever being upstreamed.

 

The new RH compiler that you get with CCS 6.x mps430-elf-gcc (version 4.9.something) is using newlib to implement libc.  Unfortunately, it doesn't produce the smallest code.  The code generation on the newer compiler is fairly decent if you avoid the libc calls and do your own thing.

 

-rick

Share this post


Link to post
Share on other sites

rick,

 

did you compile the Red Hat gcc yourself? If so, would you please tell your `configure` und `make` options?

When I tried to compile it, it failed with some Fortran error.

Share this post


Link to post
Share on other sites

The compiler that comes with Energia right now msp430-gcc (version 4.6.3) has a fairly small libc. Unfortunately, copyright issues prevent it from ever being upstreamed.

 

The new RH compiler that you get with CCS 6.x mps430-elf-gcc (version 4.9.something) is using newlib to implement libc.  Unfortunately, it doesn't produce the smallest code.  The code generation on the newer compiler is fairly decent if you avoid the libc calls and do your own thing.

 

-rick

Thanks for you input Rick, I do value your opinion. I think with spirilis' comments, and my familiarity with the "old" 4.6.3 mspgcc used with the 2013 version of Energia. I think I'll stick with that. I always found it solid, and spirilis' comments make me feel good about my decision to stick with it. If I were using a newer msp430 though . . . things would be less obvious, and lucky for me I think.

Share this post


Link to post
Share on other sites

So, the Beaglebone black's APT repo for Wheezy, and probably Jessie too ( haven't loked at jessies repo yet ) have msp430-gcc binaries . . . wonder if it's worth toying with. Ubuntu 14.04 has binaries too, but never used those. I used their armhf 4.6.3 binary and it worked great though . . .

 

EDIT:

 

Jessie . . .

$ apt-cache search msp430
binutils-msp430 - Binary utilities supporting TI's MSP430 targets
gcc-msp430 - GNU C compiler (cross compiler for MSP430)
gdb-msp430 - The GNU debugger for MSP430
msp430-libc - Standard C library for TI MSP430 development
msp430mcu - Spec files, headers and linker scripts for TI's MSP430 targets
mspdebug - debugging tool for MSP430 microcontrollers

Looking at this further and the online repo database. This is still gcc 4.6.3 from 2012, so probably not worth messing with. I've read some reports on this particular mspgcc having issues.

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  

×