Which compiler for Kinetis CW, IAR or Keil?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Which compiler for Kinetis CW, IAR or Keil?

9,500 Views
BasePointer
Contributor II

Hi,

 

Is there any one has experience about all these compilers to compare?

Which one is reliable, fast and efficient?

 

10x.

 

0 Kudos
16 Replies

2,519 Views
robertboys
Contributor IV

Hello

I just updated the Kinetis K60 lab:  go to www.keil.com/freescale and a link to it is there.

I put plenty of useful information in there and new is a DSP example that uses Serial Wire Viewer.

A RTX RTOS demo is also included.  Did you know RTX now has a BSD license and ports are available for Keil. IAR and GCC ?  https://www.keil.com/demo/eval/rtx.htm


I also made a lab for the KL25 Freedom board:    Application Note 232: uVision Lab for Freescale Freedom KL25Z Board

This document shows you how to get the MTB Micro Trace Buffer working.  It uses Open-SDA.

This lab also has a RTX and DSP demo - yes - the ARM DSP libraries work for a Cortex-M0 too !

Next topic is the Cortex-M4 Freedom and later Vybrid - Cortex-A5 and Cortex-M4.  Using DS-5 for that.

Bob Boys

ARM

San Jose, CA

0 Kudos

2,519 Views
lukas
Contributor III

I wrote that IAR has version control - but thats not right, it has only the possibility to connect to external version control system.

0 Kudos

2,519 Views
olebon
Contributor I

Yesterday I asked Freescale support if Codesourcery Lite supports Kinetis, they answered NO, but on MentorGraphics site it is written that ARM EABI version does. I installed this version just to find that there are no example projects at all. Can anybody share an example for CodeSourcery that will run on K60 tower?

And is it possible to compile an MQX-based project with CodeSoutcery (lite)?

0 Kudos

2,519 Views
mjbcswitzerland
Specialist V

Hi

 

CodeSourcery Lite is based on the GCC tool chain which will compile Kinetis projects as long as the code can be compiled by GCC (usually things like interrupt definitions, pragma use, code positioning can vary between compilers so a few 'minor' changes are often needed - although 'minor' changes can take a bit of tie to get right without some experience with the compilers in question).

 

It may be that your freescale contact meant that the CodeSourcery Lite environment/debugger doesn't support the Kinetis (it may not have the necessary reset/download scripts or peripheral register mapping) but this doesn't mean that it won't build with its tool chain. Best ask Mentor to be sure since it is their product. Also ATOLLIC now supports all Kinetis parts (incl. K70) in their tool chain (if your preference is an Eclipse/GCC based solution).

However CodeWarrior is probabyl the best choice if you do like the Eclipse environment since it is freescale's own offering and so will always have the most up-to-date processor support for sure.

 

Regards

 

Mark

 

0 Kudos

2,519 Views
emagii
Contributor II

You may also want to consider the

Atollic TrueStudio which now supports the Kinetis.

http://www.atollic.com/index.php/targets/armtargetsupport

 

Eclipse + GCC based.

 

The real cool things are the additions.

* TrueStudio

* TrueAnalyzer

* TrueVerifier

 

which is used to analyze the code.

Think a lot of the financing is coming from military projects.

 

0 Kudos

2,519 Views
sonkiet
Contributor I

I have an negative experience on IAR. The IAR IDE (vesrsion 6.10) had an error cause my K60N512 on the TWR locked and of cause I have to buy another TWR board.

 

I am also looking for the stable ID, not final dicision for using IAR or CW or Keil. Please advice.

 

 

 

0 Kudos

2,519 Views
BasePointer
Contributor II

I have used Keil for STR7 and STM32 which has Cortex M3. Their C compiler was good but about Keil IDE, we can not say it was programmer friendly nowadays.

 

0 Kudos

2,519 Views
mjbcswitzerland
Specialist V

Hi

 

- IAR is very easy to use - generates good code and has a fast and reliable debugger. Instruction level debugger useful for testing configurations and start-up code. If you can afford it it is a safe bet. For small projects, the 32k limited kick start version is useful.

 

- Keil is also easy to use - generates good code and has a fast and reliable debugger. Instruction level debugger useful for testing configurations and start-up code. Personally I find its editor and project manager a little less capable than IAR. For existing Keil users, Keil will probably be the preference. Limited version is available but less useful than the IAR Kick start since it throws in extra code to limit use. Note that Keil has a Freescale only version which costs about $600 but is otherwise full functional; this is however a 1 year term license so expires after this period.

 

- CW10.1 - Very interesting 128k limited version which is adequate for even quite large projects and is often the choice for low budget projects where Keil and IAR are too expensive. It is Eclipse base so people either love it or hate it - it is rather slow (due to Eclipse and Java script) and a bit quirky (again due to the Eclipse based operation and 'mentality') but useable with a bit of determination - but usually not as simple as the classical approach that IAR and Keil take.

 

- GCC CodeSourcery - GCC produces very good code for ARM (only a few % larger code size than the 'big-boys'). CodeSourcery offers a free GCC tool chains and also their own Eclipse based IDE. This I haven't used but expect it to be similar to CW10.1 without the Freescale plug-ins but with CodeSourcery's own.

 

- GCC Standalone - for lowest budgets, building from GCC make file works well

 

- Rowley Crossworks for ARM - their Beta version contains Kinetis support which works very well. It is GCC based with their own optimised libraries and bridges the gap between the 'top-end' IAR and Keil and the GCC world with their own high-performance IDE which gives ease of use and speed of operation as well as wide debugger support. Good licensing plans from $150 for a personal license and good support when needed.

 

Regards

 

Mark

 

0 Kudos

2,519 Views
BasePointer
Contributor II

 

Do you have any code size/ram size comparison belongs to same project but compiled with IAR/Keil and CW?

 

0 Kudos

2,519 Views
mjbcswitzerland
Specialist V

Hi

 

The following is a copy of a comparison that I did some time ago for another group - it doesn't compare RAM utilisation since this is defined to 99% by the program and not by the compiler (variables and heap utilisation are defined by the code so the compiler will effectively do as the code specifies....Heap use is also not visible without running the code in a standard mode fo operation.).

 

 

"Here is a comparison of a project (for Kinetis K60 Cortex M4 with max. optimisations for size and target in FLASH) build with several compilers - only code size (FLASH utilisation) is compared and maybe there are also 'slight' differences in RAM utilisation when they run - results for other optimisation strategies are no considered. All targets do run eqivalently on HW so should be fairly representative. There may be tricks to get more out of them but I simply screwed up the standard settings and build the same project in each environment. The project is less that 32k due to the fact that I don't have full licenses for all environments so I had to chose a project that fit all:

GCC 4.4.1 (Sourcery G++ Lite 2010q1-188) 0x5d1c [23.27k] {+12.3%}
IAR6 0x52d8 [20.71k] {ref. 0%}
Keil uVision 4 0x5794 [21.89k] {+5.7%}
Freescale CodeWarrior 10.1 0x65ee [25.49l] {+23%}
Rowley Crossworks V2.1 (Beta) 0x56b0 [21.67k] {+4.6%}

Comment: Note that Rowley Crossworks generates smaller code that the GCC makefile build (and Keil) although it also uses GCC (maybe a different version or optimisation of standard library ?)."

 

This is without any guaranty since there may be special "hidden, or subtle" optimisations offered by the compilers which were not identified during the tests. Also different reference code may result in slightly different results depending on how its suits the compiler's optimisation strengths. It is however consistent with several years of experience with ARM and these compilers, whereby IAR and Keil tend to have their noses ahead but GCC results are certainly 'respectable'.

 

Regards

 

Mark


0 Kudos

2,519 Views
TomSkwara
Contributor III

This thread is an important one as an investment in a toolchain goes way beyond the $ spent up front.  I've been working with Keil tools forever (8-bit universe though) and have been quite satisfied.  It probably goes without saying that each have their own of quarks and nuances however.

 

GCC served me well without issue for an open source project based on Cortex-M3.  Command line without the need to debug (when does that ever happen).

 

IAR could be useful if working with a variety of ARM parts.  It seems IAR example projects are usually included in every dev kit.

 

CW on the other hand is made by the hardware manufacturer themselves.  While efficiencies need to be tightened up, there is something to be said for an ecosystem or platform approach to solutions.  Kinetis silicon/CW toolchain/MQX RTOS from one vendor isn't a bad offering.  I code for iOS devices using the hardware manufacturers toolchain and it is quite pleasant.  

 

My experience with debugging over OSBDM has been like sending an AutoCAD file to an HP pen plotter though (time for a cup of coffee :smileyhappy:  Is a Cyclone MAX much faster? 

0 Kudos

2,515 Views
BasePointer
Contributor II

Tom Skwara wrote:

 

My experience with debugging over OSBDM has been like sending an AutoCAD file to an HP pen plotter though (time for a cup of coffee :smileyhappy:  Is a Cyclone MAX much faster? 


Especially ethernet interface I always preferred:
http://www.pemicro.com/speed/index.cfm

 

0 Kudos

2,515 Views
RobertSignum
Contributor I

Hi,

 

I think that compiler differences cannot be made on base of syntetic tests pefrormed on different (although similar) platforms. This is because each serious Cortex-M implementation has various speed-up techniquest (flash wait states, cach for flash, look-ahead jump buffers etc). Also compilers are constantly improving. That's why compiler vendors let you evaluate the compiler and you can see how code compiler by each compiler "behaves".

 

Since this topic evolved into JTAG tools capability, so let me address it.

 

On-bord JTAG tools are not designed to be high speed devices, but are designed to let you play with eval boards.

 

As far as JTAG emulation speed I've meansured the following using JTAGjet emulator on Kinetis K60 board.

Chameleon debugger was used to measure it, but similar performance may be achieved using drivers for other debuggers.

 

10MHz JTAG speed (default):

 

Write to ram :           522Kbytes/sec

Steps/second:          39

Flashing 512KB:      5.2sec (includes erasing)

 

30MHz JTAG speed (default):

 

Write to ram :           892Kbytes/sec

Steps/second:          47

Flashing 512KB:      4.8sec (includes erasing)

 

In addition to support for Cortex-M4, all iMX ARM-based processors are supported.

 

See here for list of supported CPUs:

 

www.signum.com/freescale.htm

 

Regards,

Robert

 

 

0 Kudos

2,515 Views
lukas
Contributor III

I try to find also the best IDE for kinetis.

 

I have experience with Codewarrior for DSC - it was great, espacially with Quickstart tool.

 

Todays CW for kinetis looks very overcombined - uncomfortable, to many windows and menus, slow.

The processor expert tool is something like old quickstart but for me it losts the charm of fast setup in quickstart

and maybee i never adapt to this tool.

 

The IAR IDE looks simple, works fine (look-out about the lock error), is fast and i saw somewhere in menu the check in/out

option. I thing it means that it can make versions of source code.

 

Keil tool also simple, solid and fast like IAR - but the J-link from IAR doesnt work there.

 

Lukas

 

 

0 Kudos

2,519 Views
pende
Contributor III

there is a benchmark about the Kinetis K60 with two different compilers. (btw, its a record for cortex-M devices)

 

CoreMark-Click-me

 

Best results with keil compiler...

 

regards, philip

0 Kudos

2,519 Views
BasePointer
Contributor II

pende wrote:

there is a benchmark about the Kinetis K60 with two different compilers. (btw, its a record for cortex-M devices)

 

CoreMark-Click-me

 

Best results with keil compiler...

 

regards, philip



Hi Philip,

 

This is nice web page, thanks for it.

0 Kudos