yyrkoon 250 Posted June 3, 2016 Share Posted June 3, 2016 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. Quote Link to post Share on other sites
spirilis 1,265 Posted June 3, 2016 Share Posted June 3, 2016 yeah you got it. The mspgcc that comes with Energia is solid for G2553 work. Old compiler, unsupported, but works great. yyrkoon 1 Quote Link to post Share on other sites
yyrkoon 250 Posted June 3, 2016 Author Share Posted June 3, 2016 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 ? Quote Link to post Share on other sites
spirilis 1,265 Posted June 3, 2016 Share Posted June 3, 2016 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. yyrkoon 1 Quote Link to post Share on other sites
yyrkoon 250 Posted June 3, 2016 Author Share Posted June 3, 2016 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 . . . Quote Link to post Share on other sites
Apr30 2 Posted June 6, 2016 Share Posted June 6, 2016 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. Quote Link to post Share on other sites
Rickta59 589 Posted June 6, 2016 Share Posted June 6, 2016 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 yyrkoon 1 Quote Link to post Share on other sites
Apr30 2 Posted June 6, 2016 Share Posted June 6, 2016 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. Quote Link to post Share on other sites
Rickta59 589 Posted June 6, 2016 Share Posted June 6, 2016 I've just been using the supplied binaries in CCS. I'm done flogging myself if they are already providing a solution Quote Link to post Share on other sites
yyrkoon 250 Posted June 8, 2016 Author Share Posted June 8, 2016 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. Quote Link to post Share on other sites
yyrkoon 250 Posted June 11, 2016 Author Share Posted June 11, 2016 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. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.