Keil vs GCC for ARM7?
Asked Answered
B

5

14

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...

Bumble answered 4/8, 2009 at 9:1 Comment(2)
KEIL provides compact and stable integrated development environment including C/C++ compiler, debugger and JTAG/SWD interface. They work coherently with minimal configuration. On the other hand if you would like to use GCC, then you need to prepare JTAG agent (e.g. OpenOCD), and its configuration may become challenging. Long story short, KEIL is more stable and compact tool chain to ramp a project with minimal effort. But if you would like to learn how JTAG, and remote debugging work with GDB server, I definitely suggest open source tools. This is my two cents.Aleasealeatory
Qustion is almost 9 years old, nice to see that the situation remains stableBumble
S
8

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.

Speechmaking answered 4/8, 2009 at 12:43 Comment(0)
M
6

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.

Monafo answered 20/11, 2011 at 23:37 Comment(0)
A
4

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.

Accipitrine answered 4/8, 2009 at 14:16 Comment(0)
J
1

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.

Juanjuana answered 4/8, 2009 at 13:3 Comment(6)
Honestly speaking, how often do you run into issues with the compiler? I've been using commercial options for years (on ARM7 and 8051 development) and have rarely had difficulties.Lesbos
@Nate: feel lucky! we're using gcc for ARM9 here and just had a really nasty problem with the compiler when we tried to use the optimisation. Lucky as we are we found a patch to solve the problem. Some years ago I worked in another company and there we had to change from gcc (for C166) to KEIL because the libraries were full of errors.Juanjuana
As an employee of CodeSourcery, I feel like I ought to point out that "commercial solution" and "open source" aren't an either-or choice -- we sell GCC-based solutions with full commercial-grade support to address and prevent that sort of problem. (We're not the only company selling GCC support, either.)Refractor
Having worked with DEC and Intel on their VC++ linker and compiler respectively, even having support isn't indicative of getting support. It took me three months to get a DEC Alpha linker that could put together a 32MB executable. Three months of not being able to ship my code, on THEIR platform. Pretty bad (and maybe a sign of why they're dead now).Vaca
We use the Rowley CrossWorks compiler - GCC under the hood but with commercial support. The support has been great - better than IAR based on my experiences.Feed
well this entire thread has just confused me even more. I just want to build something that works with least amount of issues. in fact now I hear there a multiple sources of gcc, and multiple places for support. omg. ok this is a very steep learning curve :)Bergman
B
1

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.

Borglum answered 11/8, 2009 at 17:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.