Forum: ARM programming with GCC/GNU tools General performance and support of GCC/GNU for ARM Cortex M4

Author: R. H. (polarprof)
Posted on:

Rate this post
0 useful
not useful
I'm newbie to this forum and would like to hear your comments about at 
which level the GCC/GNU compilers and linker are with the ARM Cortex M4 
compared to their commercial competitors like IAR or KEIL 
I am thinking mostly about optimization and the resulting code 
performance perspective as well as support for the special features of 
the processor core.

What about the Yagarto toolchain, does it have any known issues?

We are currently in a point to make a decision whether to take GCC-based 
tools or commercial ones for our commercial projects. Yagarto is on the 

A neutral and sincere professional answer would be great! There are 
always BOTH well done and badly done things in every software, whether 
free or paid for.

Author: Matthias (Guest)
Posted on:

Rate this post
0 useful
not useful
The question is, if you would like to risk anything in your commercial 

I dont think that there will be a significant difference when using
gcc or commercial compiler with systems like X86 desktops or
ARM based stuff like smartphones orf tablets.

In the use case of microcontrollers, there are some differences:

- The support from the commercial compiler vendors should not be
- The debugging capabilities (*1)
- Code optimizations (especially with uCs with small Flash sizes)
- Some additional features (code coverage, profiling, etc.)

My experience with free debugging tools was not so amazing. When you 
dont have much time to waste with trying to get the debugging stuff 
you see the advantage of "out of the box" working debug solutions from
commecial vendors. Even if it wont work, you can call the support to get 
it working.
Ok. You could also use forums, mailing lists, IRC, to get support for 
the free tools, but there is no guarantee that there is help for you 
within an acceptable time frame.

Personally, I would use the gcc stuff for hobby projects and not for
commercial ones. Although I have been using gcc for some commercial
projects in the past.

Author: Sam P. (Guest)
Posted on:

Rate this post
0 useful
not useful
The GCC optimizer is among the best regarding high-level optimizations, 
but it may (take that 'may' literally, on some platforms it does just as 
good of a job as any other compiler) be lacking in platform-secific 
small-scale optimization.

This doesn't really matter, however: Since your target is a Cortex M4, I 
assume your code base will get comparatively large (several 100k of 
binary size). In that case, minor differences in compiler optimization 
aren't your concern anyways. You will always need to profile your 
application, no matter what your compiler is, as compiler optimization 
will never yield the performance gain you get when rewriting hot spots 
using a different algorithm or even going straight to assembler for a 
crucial piece of code.

Due to the widespread usage and long history, GCC's language support 
tends to be more solid and implement more of relevant language 
standards. This may be a major selling point if you use lots of shared 
code, especially external code libraries.

For the same reason you get lots of independent tools that work with it, 
be it for profiling or debugging. There is more choice (which has its 
own cost, of course).

As for the difficulties in setting it up, that varies a lot. For some 
platforms, there do exist fully automatic GCC installers that just work, 
and on others, there don't. If you have people on site that speak 
command line fluently, you will always get it working. Also keep in mind 
that this is a one-time cost.

But in the end, there are too many specifics. Your JTAG adapter may not 
be supported by one or the other tool, the µC you chose has that amazing 
super-optimized compiler, or just that platform happens to be well done 
in GCC, so many variables. If you want a solution that works best for 
your specific case, just try them. GCC is free and the others should 
have evaluation versions. Write a small test app in each of them and go 
through debugging, profiling and all of your general workflow.

If, on the other hand, you want to establish one generic development 
platform for all sorts of controllers, there is no way around GCC, as it 
supports about everything there is.


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.