This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cortex M3 compilers and benchmarks

Note: This was originally posted on 20th January 2009 at http://forums.arm.com

Please help me identify the best compiler for CortexM3.
I currently use armcc from ARM, but curious if that is the best option on the market. So far, I found a couple of options for Cortex M3 compilers: GCC, armcc (RVCT 3.1) and IAR. What I cannot find is the benchmarking results or comparison between those compilers. Are there any other notable compilers/linkers for Cortex M3 that I missed?
I am mainly interested in code density and run time efficiency of the compiled image.

Thank you in advance!

Andrey
Parents
  • Note: This was originally posted on 22nd January 2009 at http://forums.arm.com

    I don't know of any public benchmarks, and if any benchmarks do exist it is unlikely that they would be representative of your code. Compilers tend to do well at different tasks, so generic benchmarks are often not very useful unless there is a very notable difference in output.

    The best thing I can suggest is that you try them. You already have RVCT, so you know how that handles your code. GCC is free, so there's no harm in trying that (aside from the engineering time spent in porting Makefiles and the like). I haven't used IAR's compiler, but they probably have an evaluation version you could try.

    I am mainly interested in code density and run time efficiency of the compiled image.

    What exactly do you mean by "run time efficiency"? Do you mean speed? In any compiler, there is a trade-off between code density and speed. Indeed, you can use "-Otime" and "-Osize" in RVCT to tell it what is important to you.

    Yes, there are bad compilers around, but RVCT and GCC certainly don't fit into that category. (I don't know about IAR, but I'd guess that it's also fairly reasonable.)

    I would recommend that you decide exactly what you're trying to achieve and then benchmark your code based on those targets. There is no point looking at benchmarks "" or even running your own "" unless you know what you want to measure.
Reply
  • Note: This was originally posted on 22nd January 2009 at http://forums.arm.com

    I don't know of any public benchmarks, and if any benchmarks do exist it is unlikely that they would be representative of your code. Compilers tend to do well at different tasks, so generic benchmarks are often not very useful unless there is a very notable difference in output.

    The best thing I can suggest is that you try them. You already have RVCT, so you know how that handles your code. GCC is free, so there's no harm in trying that (aside from the engineering time spent in porting Makefiles and the like). I haven't used IAR's compiler, but they probably have an evaluation version you could try.

    I am mainly interested in code density and run time efficiency of the compiled image.

    What exactly do you mean by "run time efficiency"? Do you mean speed? In any compiler, there is a trade-off between code density and speed. Indeed, you can use "-Otime" and "-Osize" in RVCT to tell it what is important to you.

    Yes, there are bad compilers around, but RVCT and GCC certainly don't fit into that category. (I don't know about IAR, but I'd guess that it's also fairly reasonable.)

    I would recommend that you decide exactly what you're trying to achieve and then benchmark your code based on those targets. There is no point looking at benchmarks "" or even running your own "" unless you know what you want to measure.
Children
No data