EmbeddedRelated.com
Forums
Memfault Beyond the Launch

MSP430 compiler recommendations

Started by edgershwin July 6, 2005
We are considering embarking on a project using the MSP430. I've done 
some google searches for info on various compilers but not had much/any 
luck in determining which one(s) to avoid and which one(s) are the best.

I've used TI CCStudio for 62xx family and that software was frought 
with problems, so I'm reluctant to try to use TI's tools.

Any recommendations?

Thanks,

Paul





Beginning Microcontrollers with the MSP430

If we get a dime every time this question is asked :-) I think it comes 
down to that compiler wise, we are all pretty good by now. So it comes down 
to the other things that you may or may not care about, e.g.

- Rowley supposedly has the smallest code, plus supposedly a nice debugger
- Qudravox has an integrated debugger
- We also have compilers for many other CPUs. The debugger is separate, but 
it means you only pay if you want to, and it has been in use for 15 years+. 
We have multiple versions depending on your needs.
- GCC is "free"
- IAR is, well, IAR
- TI is new, use Eclipse for IDE (Java App), and I will forever fathom 
about this, has it own code generator. Wonder never ceases.

Best to download a few demos and ask specific questions. Ours is fully 
functional for 45 days. No need to contact us. Just use it.

At 11:55 AM 7/6/2005, edgershwin wrote:

>We are considering embarking on a project using the
MSP430. I've done
>some google searches for info on various compilers but not had much/any
>luck in determining which one(s) to avoid and which one(s) are the best.
>
>I've used TI CCStudio for 62xx family and that software was frought
>with problems, so I'm reluctant to try to use TI's tools.
>
>Any recommendations?
>
>Thanks,
>
>Paul

// richard (This email is for mailing lists. To reach me directly, please 
use richard at imagecraft.com) 


Hi,

> - Rowley supposedly has the smallest code, plus
supposedly a nice debugger

IAR often promotes that their compiler produces the smallest code. Maybe they
optimized the source code better than the compiler but IAR produces a smaller
floating point code binary than GCC.


> - GCC is "free"

It's also open source, closer to C99 and produces many warnings e. g. for 
statements without effect, undefined operations and comparison is always
true/false
due to limited range of data type.
With GCC the code is more portable because when you want to modify a global
variable
from an ISR you have to declare that variable as volatile if you want to do it
portable.
Compilers like the one from IAR do allow that without the qualifier volatile and
this
causes bad code. You can find such not portable code e. g. in the code examples
from TI.

Regards,

Rolf


Rolf, 

> > - Rowley supposedly has the smallest code,
plus supposedly a nice 
> > debugger
> 
> IAR often promotes that their compiler produces the smallest 
> code. 

Wholly dependent upon benchmark.  :-)

> > - GCC is "free"
> 
> It's also open source, closer to C99 and produces many 
> warnings e. g. for statements without effect, undefined 
> operations and comparison is always true/false due to limited 
> range of data type.

IAR have demonstrated, in this group, that the newer front end is
capable of some mean feats in this area too.

> With GCC the code is more portable because when
you want to 
> modify a global variable from an ISR you have to declare that 
> variable as volatile if you want to do it portable.
> Compilers like the one from IAR do allow that without the 
> qualifier volatile and this causes bad code. You can find 
> such not portable code e. g. in the code examples from TI.

This is *not* the compier's fault, it's the user's.  Volatile has
a very
specific meaning according to the standard, and it's a user's
responsibility to know what that qualifier infers and when to use or not
use it.  The compiler only compiles what the user gives it--and if the
user feeds it nonsense, well, you can fill in the rest...

--
Paul Curtis, Rowley Associates Ltd  http://www.rowley.co.uk
CrossWorks for MSP430, ARM, AVR and now MAXQ processors

Here come my 2 bits too :)

The following error is NOT detected by IAR:) It cost me 2 hours of
debugging:(

void main ()
{
        char t;

            for ( t=0; t<= 1000;t++){}     // Bad Lint! FOR loop never
ends!

            while(1){}

}// END MAIN

For $2700 I would expected that not to happen :(

Ale





----- Original Message ----- 
From: "Paul Curtis" <plc@plc@...>
To: <msp430@msp4...>
Sent: Wednesday, July 06, 2005 8:38 PM
Subject: RE: [msp430] MSP430 compiler recommendations


> Rolf,
>
> > > - Rowley supposedly has the smallest code, plus supposedly a nice
> > > debugger
> >
> > IAR often promotes that their compiler produces the smallest
> > code.
>
> Wholly dependent upon benchmark.  :-)
>
> > > - GCC is "free"
> >
> > It's also open source, closer to C99 and produces many
> > warnings e. g. for statements without effect, undefined
> > operations and comparison is always true/false due to limited
> > range of data type.
>
> IAR have demonstrated, in this group, that the newer front end is
> capable of some mean feats in this area too.
>
> > With GCC the code is more portable because when you want to
> > modify a global variable from an ISR you have to declare that
> > variable as volatile if you want to do it portable.
> > Compilers like the one from IAR do allow that without the
> > qualifier volatile and this causes bad code. You can find
> > such not portable code e. g. in the code examples from TI.
>
> This is *not* the compier's fault, it's the user's. 
Volatile has a very
> specific meaning according to the standard, and it's a user's
> responsibility to know what that qualifier infers and when to use or not
> use it.  The compiler only compiles what the user gives it--and if the
> user feeds it nonsense, well, you can fill in the rest...
>
> --
> Paul Curtis, Rowley Associates Ltd  http://www.rowley.co.uk
> CrossWorks for MSP430, ARM, AVR and now MAXQ processors
>
>
> .
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>


Hi Alex, 

> Here come my 2 bits too :)
> 
> The following error is NOT detected by IAR:) It cost me 2 
> hours of debugging:(
> 
> void main ()
> {
>         char t;
> 
>             for ( t=0; t<= 1000;t++){}     // Bad Lint! FOR 
> loop never ends!
> 
>             while(1){}
> 
> }// END MAIN
> 
> For $2700 I would expected that not to happen :(

For $2700, you do:

Remark[Pe236]: controlling expression is constant C:\Documents and
Settings\plc\My Documents\IAR Embedded Workbench\test.cpp

You need to enable remarks.  What's the point of a manual if nobody
bothers to read it?  :-(  Could've saved yourself those two hours with a
quick scout through the manual perhaps?

Some customers treat tech support an an online manual service when
they're too lazy to bring up the Help > Search themselves.  I now
usually send back a link to our web-based manuals.  And some customers
bitch that they can't do so-and-so yet have never actually looked at the
documentation.

--
Paul Curtis, Rowley Associates Ltd  http://www.rowley.co.uk
CrossWorks for MSP430, ARM, AVR and now MAXQ processors


My analysis covers the three MSP430 compilers I have used extensively: 
Crossworks, Quadravox and IAR.

Crossworks is the better buy when considering code generation and general 
features if you are working in a professional environment. Quadravox is 
much simpler to use, having fewer options, but doesn't generate quite so 
compact code; it is also cheaper. IAR is overpriced and suffers from 
extremely poor support in the sense that once your paid subscription 
expires you are not entitled to updates; however it can generate good code. 
Crossworks and Quadravox are both very well supported with almost instant 
code fixes to reported problems. I recommend them highly.

At some point I will also look at Imagecraft (which has had good reports on 
this site) and GCC (which is free, but can have ownership implications when 
using some library code), and possibly also HiTech. Not because I want to 
change again, I might add, but to support any customers who might already 
be using those compilers.

Most (all) the compilers allow a 30-day trial just by downloading.

Hugh

 > At 18:55 06/07/2005 +0000, you wrote:
We are considering embarking on a project using the MSP430. I've done
some google searches for info on various compilers but not had much/any
luck in determining which one(s) to avoid and which one(s) are the best.

I've used TI CCStudio for 62xx family and that software was frought
with problems, so I'm reluctant to try to use TI's tools.

Any recommendations?

Thanks,

Paul



	I use Imagecraft's icc430 and like it. Support is very
good, even when I ask less-than-brilliant questions. 
Object code looks very good, but I can't compare it with 
any other compilers.

	I tried IAR at first and found it ... cumbersome. And I
had a lot of trouble getting 2 different free editions mixed
up.

	While I'm on the soap box, hardware manufacturer Olimex
has a US retail supplier with excellent prices and service.
Their MSP430 items are here:
  http://makeashorterlink.com/?G34B2136B 
and here:
  http://makeashorterlink.com/?X25B2236B 
They also have lots of other interesting things for sale. 
I have no connection with them other than as a very satisfied 
customer.

Jack Powers 
Powers Technical Services     
jtpowers@jtpo...  +1-408/621-1883



----- Original Message ----- 
From: <alex@alex...>
To: <msp430@msp4...>
Sent: Thursday, July 07, 2005 2:53 AM
Subject: Re: [msp430] MSP430 compiler recommendations A


> Here come my 2 bits too :)
>
> The following error is NOT detected by IAR:) It cost me 2 hours of
> debugging:(
>
> void main ()
> {
>        char t;
>
>            for ( t=0; t<= 1000;t++){}     // Bad Lint! FOR loop
never 
> ends!
>
>            while(1){}
>
> }// END MAIN
>
> For $2700 I would expected that not to happen :(

FWIW, gcc picks that up.

Leon 


---
[This E-mail has been scanned for viruses but it is your responsibility 
to maintain up to date anti virus software on the device that you are
currently using to read this email. ]


Thanks to all for your inputs/comments. Looks like Image Craft is the price
constraint winner.

 

Paul

  _____  

From: msp430@msp4... [mailto:msp430@msp4...] On Behalf Of
Jack
Sent: Wednesday, July 06, 2005 11:49 PM
To: msp430@msp4...
Subject: [msp430] Re: MSP430 compiler recommendations

 


      I use Imagecraft's icc430 and like it. Support is very
good, even when I ask less-than-brilliant questions. 
Object code looks very good, but I can't compare it with 
any other compilers.

      I tried IAR at first and found it ... cumbersome. And I
had a lot of trouble getting 2 different free editions mixed
up.

      While I'm on the soap box, hardware manufacturer Olimex
has a US retail supplier with excellent prices and service.
Their MSP430 items are here:
  http://makeashorterlink.com/?G34B2136B 
and here:
  http://makeashorterlink.com/?X25B2236B 
They also have lots of other interesting things for sale. 
I have no connection with them other than as a very satisfied 
customer.

Jack Powers 
Powers Technical Services     
jtpowers@jtpo...  +1-408/621-1883




.






  _____  

>  Terms of Service. 

 

  _____  







Memfault Beyond the Launch