Forums

ARM Code compatability: Keil, IAR, GNU,

Started by Johnny Chang January 19, 2009
First off, I've only got a little bit of embedded programming
experience.  I'm going to begin some development on some ARM
processors and I have a board coming in and have a Keil toolchain.  I
have found some useful examples, but they all come in two flavors: IAR
and GNU.  Will these be compatible with my Keil stuff? If not, how
hard will it be to get them to work and which one should I start with?

Thanks,
Johnny
"Johnny Chang" <johnnyz86@gmail.com> wrote in message 
news:1f4d601a-fde5-4adf-9058-5cc795026e4d@y1g2000pra.googlegroups.com...
> First off, I've only got a little bit of embedded programming > experience. I'm going to begin some development on some ARM > processors and I have a board coming in and have a Keil toolchain. I > have found some useful examples, but they all come in two flavors: IAR > and GNU. Will these be compatible with my Keil stuff? If not, how > hard will it be to get them to work and which one should I start with?
Keil also provide lots of examples, search their WEB site and also look in the Examples directory of the toolchain installation. Most of the code is compatible between the different compilers, areas that will not be include: 1) Linker scripts. 2) Startup code. 3) Any keywords that are non ansi for section placement but most importantly interrupt definition. 4) The project file format. The FreeRTOS ARM7 code compiles with Keil, IAR, Rowley, vanilla GCC, Raisonance, and probably others that I have forgotten so you can see what the differences are. -- Regards, Richard. + http://www.FreeRTOS.org Designed for microcontrollers. More than 7000 downloads per month. + http://www.freertos.org/Documentation/FreeRTOS-documentation-and-book.html New RTOS programming eBook now available.
On Jan 19, 2:49=A0pm, Johnny Chang <johnny...@gmail.com> wrote:
> First off, I've only got a little bit of embedded programming > experience. =A0I'm going to begin some development on some ARM > processors and I have a board coming in and have a Keil toolchain. =A0I > have found some useful examples, but they all come in two flavors: IAR > and GNU. =A0Will these be compatible with my Keil stuff? If not, how > hard will it be to get them to work and which one should I start with? > > Thanks, > Johnny
If you are familiar with "C", you should be able to port examples from any other implementation to Keil. As Richard already pointed out, there are lots of examples coming with the Keil toolchain as well. Depending which particular ARM devices you are going to use, manufacturers will also offer examples. I am most familiar with the NXP devices, and on the NXP-microcontroller website there are many examples using Keil. There is however another unasked question. How easy is it to go from one supplier to another. The answer there is a little more on the cautious side. Most devices will offer some distinguished features that can not easily be replaced. So, switching tool chains or porting a GNU example to Keil or IAR will cost some time, switching manufacturers will take a lot more time. Having said this, switching architectures, e.g. going from ARM to PowerPC, or from PPC to ARM will take even (a lot) more time. This time will be spent on the low level drivers rather than the "generic code". If you happen to use an RTOS, switching architectures becomes a lot less painful. Pick your bits and pieces wisely ;-) An Schwob