Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCC vs Greenhills on ARM

I'm interested in any comparisons between GCC and Greenhills C compiler with regard to memory footprint of generated code specifically on ARM platforms.

Are there any benchmarks or comparisons for these compilers? Has anyone had any experience here that they'd like to share?

like image 526
atikat Avatar asked Jan 22 '10 02:01

atikat


2 Answers

You should note that the Green Hills EULA explicitly prohibits licensees from publishing benchmarks.

What you can do is obtain an evaluation licence from Green Hills and perform your own benchmarking. That would be more trustworthy and representative in any case since you could test it on real production code. And in any case the benchmark for say an ARM7 may be very different to that of a Cortex-M3 for example, so any available published results may not be comparing like-for-like, and may not be representative of your platform.

Beware also that I have experienced widely varying results from different binary distributions of GCC even when ostensibly from the same code base version (specifically with software-floating-point performance. So you are still probably best off trusting your own evaluation results only.

You might consider Keil and IAR at the same time which also have evaluation versions. Why are you considering just these two? People generally go with Green Hills when they have big budgets and can benefit from the RTOS integration and debugger capabilities available from a single source; any benefit you might get from using the compiler alone is unlikely to justify the license costs IMO.

like image 155
Clifford Avatar answered Oct 18 '22 21:10

Clifford


I have not seen any benchmarks but from my experience the two compilers is very similar code size and the code generated.

Green Hills has lots of documentation and support if you want to reduce your memory foot print, with GCC it get lonely very fast once your off the beaten track. Green Hills also support compressed executable images that is great if you have limited FLASH but plenty RAM.

I have also used custom runtime and C libraries (This can save you some more space) with both compilers but you will need to do some digging to get info for GCC but the Green hills you can get some of the stuff via a wizard that generates the build file.

like image 24
Gerhard Avatar answered Oct 18 '22 22:10

Gerhard