Skip to main content
Topic: keil 4 arm WTF (Read 28511 times) previous topic - next topic

keil 4 arm WTF

after some delay I had to make I started a new project that involves some stm32f4 mcu and I tested few different compilers and ide's to see what's changed since I last tried ... I used to use free arm tools but lot of ppl mentioned KEIL as a "best arm dev environment", best compiler etc etc ... the price for the thing ain't low too ... I tried Keil before and was not impressed, lack of autocomplete and any type of helper, ide that looks like from win3.0 era with editor that apart from being able to indent code could not be called programming editor :( ...

anyhow, I heard 4.7 got autocomplete and all the other gimicks all the modern ide's have for past 10 years so I decided to try it out ... now I feel incredibly stupid. It took me 2 hours to compile a simple project, this ide is still the worst ide I ever used, I used better IDE's 10 years ago ...

so, apart from having a "good name", what the hack is so good about Keil? is there anyone that can open my eyes and explain to me why should I use Keil and not some free eclipse+armgcc ? I have the option to use licenced keil but the reason to chose keil instead of atolic or some free tools (coocox is interesting but it's M4 support is not that great) ?! I do not see it ... and it can't be that expensive and praised by industry if it's this bad, and after 2 days with it, it is soooooooooooo bad ...

Re: keil 4 arm WTF

Reply #1
atolic is 1000eur, keil is 5000eur

atolic uses free gcc, keil uses proprietary compiler or gcc

I don't get it ... 1000eur for atolic is too darn much but 5k for keil ?! i want to understand what is that they are offering that cost that much

Re: keil 4 arm WTF

Reply #2
I had the same feelings about using IAR a while ago.  Felt a bit outdated and was very expensive.

For commercial stuff (Day Job) I use Rowley CrossStudio. It's a nice IDE, missing a few features I like in eclipse based solutions( like ctrl+click hyperlinking) But supports every ARM chip out there and just about every Debugger/jtag.

Re: keil 4 arm WTF

Reply #3
Most, if not all, of the (commercial) IDEs are in a state where it is a hell to do anything fast. I previously wrote a rant about the state of ARM development and that impression has not yet been altered for the better. Speaking for myself, I do development exclusively under Linux and that makes it even more stressing because you have to search for almost everything,

As a consequence, I've been collecting and adapting linker scripts, rewriting basic core-support libraries (that do not pull in large code.chunks for the use of one small function; effectively killing vendor-part cmsis) and recreated crt0 code.

It takes a long ride to get to the point where it is just as easy to use an ARM core than to take an (8bit) AVR/gcc or a PIC/sdcc. I would have been using ARMs a long time sooner if it hadn't been for the time required to create a generic build framework. The cost of the ARMs is low (often under AVR/PIC), but is unfortunately offset by the increased effort of (easily) building good software for the target. Using 1..5k$ on a barely usable commercial product does not help to improve cost-efficiency, let alone make it accessible to the broader hobby users.

Re: keil 4 arm WTF

Reply #4
I use the Keil MDK tools at work - I can absolutely confirm it is a total piece of crap as far as an editor goes.  The auto-complete they added is tolerable when coding C but unusable for C++ - like you noted the rest of the editor is absolute crap.  Keil has an Eclipse plug-in that I keep meaning to try (it seems reasonably popular based on the response of their forums), but I can't remember if it brings in debugging functionality or not.

I'm using Keil primarily because it's what the company has used in the past for 8051 and they seem to have a strong background, commercial support, etc.  Cost isn't a huge issue at the day job.  It also took some convincing to get management to switch from 8051 to ARM cores, so the code-limited version helped me to prove that ARM Cortex was a good idea.

I'll have to look into Rowley Cross Studio if we ever decide to switch.

Re: keil 4 arm WTF

Reply #5
[quote author="arhi"]atolic is 1000eur, keil is 5000eur

atolic uses free gcc, keil uses proprietary compiler or gcc

I don't get it ... 1000eur for atolic is too darn much but 5k for keil ?! i want to understand what is that they are offering that cost that much[/quote]

I think Keil claims to have the most efficient cross-compilation...not sure how valid the claim is compared to others out there. 

I'm also not sure how many of the competitors offer full ETM capability (basically a true real-time trace as I understand it).  I've only been using low-end IC's so far (and also don't have a debugger that can handle ETM), but if you're trying to do run-time analysis, code coverage, etc, I imagine this would come in really handy.  From a quick search, it looks like IAR also supports ETM during debugging, perhaps this is one of the differentiating factors in price?

Re: keil 4 arm WTF

Reply #6
I've just been through the same thing whilst trying to migrate a project that I started on mbed to a custom board. The binary generated by the Keil compiler is supposed to be smaller than the Code Red (LPCXpresso) toolchain that I'm now using, but as you say, the IDE felt a decade out of date. One reason I was looking at it though was microlib which is their highly optimised (albeit restricted) newlib - in the end though I found out that the mbed team's changes weren't yet in the currently available Keil release (should make it into uVision 5 apparently) and therefore I couldn't use it with C++ anyway. That was sort of the nail in the coffin as far as I was concerned and so spent a week porting everything across to C, wrote off the £350 that I spent on the ULINK2 debugger (which by the way doesn't seem to work with anything other than Keil) and knuckled down with the LPC User Manual.

I'm getting on much better with the CR tools but LPCXpresso's debugger is locked to NXP's devices (it exchanges keys with it when it connects I think) so I'm not sure that you'll be able to make it work with ST I'm afraid - not sure about the LPC-Link 2 that they've just brought out.

I wonder what the future of the Keil suite is anyway considering that ARM have the DS-5 stuff which seems to do all architectures (for an eye-watering price) and (I think) is built on Eclipse.

ARM have not long ago released newlib nano to try and shrink GCC builds for their smaller architectures but I'd like to see them go all the way and sort out a proper open source end to end toolchain - having to piece together everything from scratch is painful and had this not been a work project that I was doing, I'd have dumped it and gone back to AVR/PIC.

 

Re: keil 4 arm WTF

Reply #7
Dum question, but why aren't you guys just using the gcc toolchain to cross compile your ARM apps?
And the Segger debugger is tolerable...not as good as Eclipse, but ok.

Re: keil 4 arm WTF

Reply #8
[quote author="kenyee"]Dum question, but why aren't you guys just using the gcc toolchain to cross compile your ARM apps?
And the Segger debugger is tolerable...not as good as Eclipse, but ok.[/quote]

There is a difference between general ARM development and embedded ARM development.

I am using gcc from https://launchpad.net/gcc-arm-embedded/ which is nicely complete and functional. As for IDE, I do not use any, except if you want to call (g)vim+make and IDE ;-)

The problem is not the toolchain, but the support libraries. You need to have the proper crt0 startup code (with an appropriate vector table) with a matching linker script for the target. Then you may (search and) fiddle your way around with more or less (in)complete vendor-supplied CMSIS code and curse your way locating bugs in the definitions and declarations.

If you do development between a significant portion of vendors and targets, then you find yourself in a mesmerizing mess of code jungle. Many commercial IDEs have a whole set of targets they support, where they have created the appropriate scripts and interfaces you can pull in from the IDE to become part of your project. But you still need to hack through that code in order to get it to play your way (IMNSHO: a library should not be something you need to fiddle with).

For the commercial IDEs, you can clearly see that they have an emphasis on only part of the problem. Some have excellent target support, some have a great IDE and some have good integration. But none has it all and they all are expensive.

Re: keil 4 arm WTF

Reply #9
uh, it feels good to know I'm not the only one who things keil ide is a piece of crap ... I really expect more from a 5k tool :( .. didn't pay for it (yet) but for hobby use the price of 5k is really just too freaking much, especially as mips core in pic32mx is not so much worse then arm core and mplabx+c32 are free and up to date with the time we live in :) ... and even if you wanna get yourself a commercially licences compiler it's iirc 500$ so order of magnitude less then keil ... anyhow I really got fed up with microchip and I'm trying to move away .. ST does seems very good at the moment so I wanna try to switch completely

@SolderSplashLabs, that CW looks interesting on the web, 150$ is acceptable for hobby (more then), they have Linux version and that's huge + as it does not requires wine nor vbox... only not sure about the support .. (target and debuggers, especially stlink2 and cortex m4) ..

@bearmos, what do you mean by most efficient cross compiler? I see keil offers me some internal compiler and gcc (ide is so great trying to find that menu now for 30minutes and can't find it :D :D :D) .. what is the efficiency we are talking about? good code, small code, fast code ... so some C/C++ optimizations or we are talking about better use of thumb2 for better packing? knowing automatically how to use DSP ability? FPU? or we are talking more about it comes with universal libs so you just change your target (from ST to TI to NXP) and it still works?

@scsims, did you compare binaries? I never used CR 'cause I like ST more then NXP (not sure why but I decided when I started with arm's that I like ST way more then NXP .. even while nxp is more hw packed then ST ... I think it might be the Discovery boards and good examples with good support from super cheap far east sites like futurelec .. compared to free on-line compiler and mbed project that i seriously disliked)

@kenyee, well yes and no, not that simple .. if you go with fully open system you waste huge amount of time to get it up to work (explained already) so if you are a company then it's not a big deal you can invest time and money and make your own libs and inits but if you are a hobbyist you kinda wanna use a lot of different mcu's and not glue all your projects to a single one

@Bertho, I do not want to go vi make path again ... I did a lot of development that way (especially in the 8bit mcu field) but now with larger projects, reusable parts etc I want code expansion, I want to ctrl click on a function and jump to it, I want to in 2 clicks see what enums are available for an attribute or how some structure is defined .. I want macro expansion tooltips, it speeds up work significantly, I just want to enjoy making embedded hw I do not want to "just make it", that's why I want a good ide.. that's why I tried Keil hoping it's a good tool since everyone was kinda "wow it's soooo good" and arm was in the "we have to own this shit" so they acquired it ... I was thinking that IAR is the only tool that's so shitty and ugly and feature lacking that there is no way another vendor will do the same thing ... unfortunately :( looks like I was wrong :(

@bearmos, the eclipse plugin, I see that I have it, have you tried it? any good link to "how to setup and use it?" ... maybe if they can make eclipse ide integrate with keil .. it might work?

Re: keil 4 arm WTF

Reply #10
The good things about Keil is that their compiler is excellent, the debugger is reliable (as far as embedded debuggers go), and the tracing features are pretty neat if you have the necessary hardware. It's also easy to get up and running.

On the negative sides, the IDE isn't all that great as you've noticed, and it can be restrictive compared to simple makefiles. One bizarre "feature" is that it seems the chip maker's peripheral libs bundled with the compiler are always included in your header search paths, and trying to use newer versions lead to undiagnosable compiler errors until you get everything just right. Also, last time I checked the version of GCC offered by Keil was ancient and probably not usable for anything newer than ARM7TDMI.

If the open source tools are good enough for your needs, and you don't need graphical setup wizards for everything I don't really see a reason for buying Keil or any commercial compiler for that matter.

Re: keil 4 arm WTF

Reply #11
[quote author="andersm"]
If the open source tools are good enough for your needs, and you don't need graphical setup wizards for everything I don't really see a reason for buying Keil or any commercial compiler for that matter.[/quote]

There is a graphical setup wizard in keil ?! show me please, enlighten me :D .. I love graphical setup wizards :D .... when I started keil I expected

NewProject -> select some of hundred dev boards out there or select a mcu -> select external osc speed -> select target mcu clock -> bang, here's a hello world project with startup code already in, with systemsetup already there setting the oscillator and a blank main() function or a main function with while(1); ...

Re: keil 4 arm WTF

Reply #12
[quote author="arhi"]@Bertho, I do not want to go vi make path again ... [/quote]
I do not think that you should go back to vi+make ;-)

My point is that you will, most probably, not find any package that will suit your needs and desires.

As far as I see it, you may want to use a generic IDE and make your own integration from there. Then you have the editor of your choice with the ability to hop through the codebase with simple clicks. The generic part you use to configure the actual build and debug system.

However, my best guess is that you will have a (very) steep road ahead of you to create your "perfect" environment and you will not be able to "buy" your way to such system. And that is the very reason why I keep it simple with proven tools. If the project is too large than for my brain to hold, then I've done something wrong (which works for ~<100kloc projects).

[quote author="arhi"]NewProject -> select some of hundred dev boards out there or select a mcu -> select external osc speed -> select target mcu clock -> bang, here's a hello world project with startup code already in, with systemsetup already there setting the oscillator and a blank main() function or a main function with while(1); ...[/quote]
Maybe you should go with coocox?

Re: keil 4 arm WTF

Reply #13
[quote author="arhi"]@bearmos, what do you mean by most efficient cross compiler? I see keil offers me some internal compiler and gcc (ide is so great trying to find that menu now for 30minutes and can't find it :D :D :D) .. what is the efficiency we are talking about? good code, small code, fast code ... so some C/C++ optimizations or we are talking about better use of thumb2 for better packing? knowing automatically how to use DSP ability? FPU? or we are talking more about it comes with universal libs so you just change your target (from ST to TI to NXP) and it still works?[/quote]
Here is the marketing BS i was quoting...like I said, I haven't done any independent comparisons, personally.  If you're using their libs they claim they're much smaller than the "standard" libs - see MicroLib further down that page.  I briefly checked into the HWFPU on the M4 and Keil seemed to be generating code (and achieving better run-times) when using the compiler switches to enable/disable FPU - and of course there are the standard CMSIS DSP algo's that most silicon providers are suppose to ship for free so you can make use of HWMAC, etc.

[quote author="arhi"]
@bearmos, the eclipse plugin, I see that I have it, have you tried it? any good link to "how to setup and use it?" ... maybe if they can make eclipse ide integrate with keil .. it might work?[/quote]
Like I said, I haven't tried it (can't justify the time or toolchain change/disruption ATM).  Here are some links from some very brief digging....
- http://http://www.keil.com/support/man/docs/ecluv/ecluv_instplugin.htm
- http://http://www.keil.com/support/man/docs/ecluv/ecluv_importuvprojects.htm

[quote author="arhi"]
NewProject -> select some of hundred dev boards out there or select a mcu -> select external osc speed -> select target mcu clock -> bang, here's a hello world project with startup code already in, with systemsetup already there setting the oscillator and a blank main() function or a main function with while(1); ...[/quote]

Check out "C:KeilARMBoards", or "C:KeilARMBoardsST" specifically for all of the ST discovery examples (uVision projects are all already setup, etc).  When I started getting into ARM I worked through understanding how CMSIS fit together and these examples helped.  Unfortunately, ST puts a LOT of extra crap (#defines) in their code so it'll work across various discovery/eval boards, so it can become convoluted...

On one hand, it's nice because they include the standard peripheral drivers for ST "out of the box", but like andersm pointed out, their default paths are always included, which makes upgrading the libs a minor PITA (I just remove the ones included by default and point it at my own repository - this breaks all the examples, but once you're up and running that doesn't really matter anyway).

Re: keil 4 arm WTF

Reply #14
coocox tries to replace too much stuff with wizards :D

as for setting my own system, yeah I know that and I hate that, in work I have my own system (based on emacs and lisp scripts) for working with mccge and I hate it .. yes it works, yes it's fast, yes it does everything i need... but if I need to change something there's noone to consult with, when something don't work as expected, there's not a community of thousands of smart ppl with same problem (and usually few solutions) .. so, not the best solution really ... for small stuff, asm stuff, 8bit stuff, it's easy, it's usually few .c or .s files and a Makefile .. and I do not need ide there, vi or emacs are more then enough .. even gedit works :D .. but these 32bit things tend to be kinda larger so before I get used to "anything" I'm trying to figure out the best solution to start getting used to :)... I'm not into ARM's for long time, I made few projects in Atolic, made few with vi+arm-gcc and newlib, few with vi+codesourcery gcc .. but that's it, not nearly enough to get accustomed to any particular way of going about arm projects, and when I say arm I talk about cortex m0, m3 and m4, not about arm CPU's like A8 or A11, A13 .. tablet stuff etc etc !! so I actually have less requirements then most of you using arm's at work :D but that's why I mentioned KEIL, afaik keil only supports cortex's, it does not support the cpu's

so I will adapt to whatever I start using, I used way uglier env's then keil in my past :D, the idea is to try to get something and stick to it but before the "stick part" chose a proper thing to stick to.. I can adapt and get used to keil as it is, but why do it if there's an easier way to go about the same thing will no or little drawbacks :)