How does Keil compare to GCC for ARM7 development? I'm in the process of choosing hw consultants for a medium size project and some use keil and some use gcc. I'd like to know the gotchas involved in going with either option...
There is very little difference between the two from a coding/development standpoint. The only thing I think you should consider is not specific to these compiler. Maintenance:
- Will you be able to maintain the software if you do not have access to the Keil compiler or will it be a minor cost?
- Also what debughardware/JTAG is supported and what will the cost be if you need to get some?
- What will the cost be
if you have to move from one compiler
to other compiler due to having to
switch developers later?
Unless you are very cost sensitive I think the real question is who will do the best job since the compiler will be a minor problem.
It should be possible to structure your code to use both compilers. Attributes like "packed" can be macro'd up so the code is happy under both. Push hardware details down into lower levels, and configure hardware maps at run-time instead of compile time. If you must have separate Kiel and GCC versions of a piece of code, put them in separate files and configure which is used with the gcc make or the Kiel project file.
One problem I've yet to solve is assembler code. Kiel uses armasm, while gcc uses as. They seem to have very different source code formats. Another reason to avoid assembler if you can.
The advantage of going with GCC is that you can target non-ARM platforms - ideal for simulating your application on a platform with much better development tools (i.e. valgrind under x86 linux). In fact, this is the approach every ARM-targeted application should take. Develop on x86 first, then port to ARM.
There's also the cost of staying current with Kiel. Once place I know is stuck on RVDK 2.1 (2002?) because the cost to upgrade to the latest for three developers is prohibitive.
I'd also add that gcc & pedantic will shake out warnings and errors in your code a lot better than our (admittedly ancient) version of Kiel will.
Kiel might deliver tighter ARM code, so keep it for doing target builds. Otherwise use GCC.
If I remember right Kiel is now owned by ARM. ARM compilers are night and day better than gcc for producing good code. I seem to remember Keil including a reduced or free or whatever version of rvct. So my question is having much faster, cleaner, better code worth using a commercial solution when gcc is out there and well used? I would go with gcc unless you are in a performance crunch situation and are willing to have to mentally translate between all the gcc based information freely available on the net to your commercial tools and back again. In general going with gcc is probably the better path, granted there is probably a wealth of information behind the google search box for Kiel but the amount of knowledge and information for gcc based solutions shadows that.
If the consultants are using one tool to do the initial legwork for a project for you and then at the end they hand the work over, you probably will want to have a gcc based solution (that doesnt mean say vxworks gcc, or even code sourcery gcc, but a generic gcc solution), because no doubt you or someone else you hire is going to have to pick this mass up and run with it and with gcc you are more likely to find someone willing and able.
The main benefit of a commercial solution is the support for me if you run into problems with the compiler or the libraries.
Open source is fine when you are using main stream hardware (in case of gcc = x86). Most of the problems of the compiler or the libs normally will be fixed very soon by the community.
If you are developing on a (perhaps exotic) embedded platform you soon can feel pretty lonely if you have any problems with the tool chain.
We use the Keil platform and are very happy with it's performance and optimization. I ran some standard benchmarks a couple of years ago and they were quite good. Another consideration is support and so far, Keil has had very good response times and relatively good feedback on some tough issues.
FYI, if your project will use the Keil RTOS and you have any questions about it, the source code is available for purchase.
© 2022 - 2024 — McMap. All rights reserved.