2008-07-16 09:26 PM
C/C++ compiler provided
2011-05-17 03:39 AM
Hello!
I downloaded and compiled the latest (4.3.1) GCC code to use it as a cross compiler for ARM Cortex-M3 based microcontrollers (primarily STM32xxx). I would need some help to test it. If somebody has any notice about the compiler, please let me know. Of course, I'm not a programmer, so if you have a problem with the compiler itself, please write an email to the maintainer. If you can help me to make a well-usable compiler suite for Linux, please write me an email. My address is:mailto:hg8lhs@gmail.com
Thank you very much.2011-05-17 03:39 AM
Quote:
Of course, I'm not a programmer
So why are you playing around with a compiler?! :o2011-05-17 03:39 AM
I guess he meant he's not a GCC developer. but I don't understand what he's trying to do, isn't there a codesourcery for linux?
2011-05-17 03:39 AM
2011-05-17 03:39 AM
Quote:
Does this mean that GCC natively supports the Cortex-M3?
I guess it must - since Raisonance and others are also using GCC for Cortex-M3 support...2011-05-17 03:39 AM
Correct, GCC 4.3.0 does support the Cortex-M3 (and of course the STM32), I tested it in my project and it seems to work correctly.
If you want to give it a try there is a WinARM test build that includes GCC 4.3.0. You can download it here:http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/
(the link is in the middle of the page, it is a 37MB download). You need to use the options -mcpu=cortex-m3 -mthumb I also recommend the options -O2 -fomit-frame-pointer -mabi=apcs-gnu in order to get faster and smaller object code. regards, Giovanni --- ChibiOS/RT2011-05-17 03:39 AM
it'd be nice to know what version of codesourcery was merged into GCC 4.3.0. maybe it's better to keep using codesourcery for a while, it's probably more mature code, don't you think?
2011-05-17 03:39 AM
I tested both codesourcery and GCC 4.3.0. Both seem to do quite well in generating Thumb2 code even if some optimizations seem to be missing compared to the ARM mode.
As example, the Thumb and Thumb2 modes do not perform the tail calls optimization and this often results in larger and slower code, also the stack usage is more aggressive (bad for embedded applications), this optimization is present in ARM mode. I understand that it is not done in Thumb mode because issues with interworking, but the Cortex-M3 does not have the ARM mode so the interworking should not be a constraint and the optimization should be included. I am sure it will mature. I am impressed overall by the quality of the GCC ARM port. regards, Giovanni --- ChibiOS/RT