Author Topic: If you had to start over today with STM32... which toolchain? GCC? Kiel?  (Read 73061 times)

0 Members and 1 Guest are viewing this topic.

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
Open source is only free if your time is worthless. Right?

I use keil, because Keil is ARM. It's not free. MDK-standard is € 3950,-...back in 2012... for when I asked a single user non-profit license.  :--

Apart from the simplistic notepad it features, it does its job as it's supposed to. With plenty of documentation on the toolchain at http://infocenter.arm.com.
Keil also makes quality dev-boards for a variety of platforms. And uses very decent ulink or segger programmers. Also not free. (yet there are clones)

I must admit, on x64 it sometimes suddenly stops rendering the ui. But I'm still on the latest uvision V4 for project compatibility reason. Why upgrade when it works?

Why isn't this a poll?

Good info on Kiel. Currently the direction I'm leaning. A big factor I hadn't considered was the middleware in the Pro version. I looked at the examples source and it looked just too easy to pass up.

Poll.... Yea. That would have been a good idea. I guess it's too easy to just click the poll for your favorite and not really add to the conversation though. For example, I'm not looking at $9500 for Kiel Pro with Middleware, which is outright ridiculous to a hobbyist, but if spending that lets me get my product going even a single month ahead of me coding everything it would be worth it. Although it would really end up being close to six months more realistically.

Yea, I'll need to go to the CFO and propose we spend this, it'll be a battle, but in the end, all anyone will remember is that we have a great new product shipping and I did that. The pain of spending money now will soon be forgotten.

I want to go with Rowley, but they are a little lite on examples and right now those are how I'm learning the fastest. I'd be starting a day1 search for the middleware I'll eventually need and when I find it - who even knows if it works right away in Rowley? If I was doing smaller projects OR I had a team of people working on it, Rowley seems the better solution. But just me responsible for every aspect of the product, I think I'm going to go with Kiel.
 

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
3950 euro for a gloryfied notepad? Shudder... I have used Keil's uVision4 as well but it really is stuck in the 80's. I know from my own experience it can do a little bit more than what notepad does but uVision4 doesn't stand a chance when compared to Eclipse. IMHO uVision4 is a prime example on an afterthought IDE tinkered together by interns.

There are some really big companies behind Eclipse like IBM, Google and Oracle. They all had the same problem: no decent IDE so they joined forces and built one. There is proper documentation and if you want support then IBM is happy to sell you support for using Eclipse: http://www-03.ibm.com/software/products/nl/ratielitsuppforecli I'm pretty sure you can get paid support from other parties as well.

Well... Let's not be hyperbolic here... KIel's cost is for support, updates, the official ARM compiler, the RTX RTOS, debugger, etc etc, and then the IDE.

Perhaps you can elaborate the specific features has that Eclipse has that Kiel does not?

Does uV4 not balloon variable values on mouse over? Does it not have a code complete? Can you not quickly find function/variable declaration or instances? I've seen many people write how superior X is over Y and then fail to give specific tools or features they themselves use to come to that conclusion.
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Nice thing about this thread is that most people are very happy with the tools they are using.
I use eclipse cdt with gcc. Works for me.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Does uV4 not balloon variable values on mouse over? Does it not have a code complete? Can you not quickly find function/variable declaration or instances?

None of those are worth money anyway...
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Does uV4 not balloon variable values on mouse over? Does it not have a code complete? Can you not quickly find function/variable declaration or instances? I've seen many people write how superior X is over Y and then fail to give specific tools or features they themselves use to come to that conclusion.
IIRC uVision4 can show a list with functions in a file and I think you can jump to a function by clicking on it. I forgot whether it can do the more advanced things you listed. The 5 minute video on this page sums up the 4 features of the uVision editor: http://www.keil.com/uvision/ide_edt.asp

Besides the features you list Eclipse can do a lot more. For starters Eclipse supports many programming languages so you can have an FPGA project together with the embedded C code and C++ PC application projects in one environment (workspace). Add a web or Java application if you want. Except for the FPGA code all software debugs in the same environment in the same way. With Eclipse you only have to learn one environment for software development. Then there is integration with various version management systems, keeping a list of TODO tags, real-time syntax checking, variable renaming (refactoring), comparing files & shuffling changes back and forth, keeping a local history of changes to a file (and compare the changes you have made since a certain point), having multiple build targets, call hierarchy, highly configurable code formatting (Eclipse formats my code the way I want it while I type), matching brackets/braces/etc highlighting, coloring existing members of structs and classes, compiler settings per file or exclude a file from compiling, show the body of a function in a pop-up when you hover over the name so you don't have switch to a different file to look it up, smart struct/class member completion (even when it is a C++ template based variable), make sense of the Linux kernel and other huge C/C++ projects, being able to work with multiple people on one project. These are just a few features from the top of my head but there are so many other clever little things built into Eclipse which make life easier .

For me it is also handy that Eclipse is cross-platform to the extreme. Because the projects are interchangeable between platforms I can open the same project in Windows to build a Windows executable from a project I develop in Linux.
« Last Edit: May 21, 2015, 12:40:56 am by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Nice thing about this thread is that most people are very happy with the tools they are using.
I use eclipse cdt with gcc. Works for me.

Not good enough, you also need to ridicule the other products.
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
At work we use both Keil and Eclipse based tools. Keil has aways been solid and reliable, if a bit "old fashioned". There was one issue I had, which I raised a ticket for, and a few weeks later they fixed it and invited me to download a new version, so I was quite pleased with the support.

Eclipse OTOH has been a lot more problematic, even though it is a version provided and supported by Freescale with Freescale plugins. We've had lots of funny issues, colleagues and I spend hours sifting through maze of options and settings, trying to get it to build right. Sometimes we have to rebuild the workspace to get projects working again, after some weird thing happens. Debugging can get into a right mess.

With Keil, I can write code and trust it does the right thing. With Eclipse, I'm never quite sure. Eclipse does have some nice sugar features, none that I really need. Some prefer Eclipse, that's fine, but I think objectively it has taken us a lot more effort driving the tool compared to other tools.
Bob
"All you said is just a bunch of opinions."
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
It depends on the version of Eclipse. The last couple of versions are stable without quirks so it could help to update Eclipse. I have also used Freescale's Eclipse based Codewarrior 10.3 but I have a feeling they messed a couple of things up in Eclipse or it is an older version of Eclipse.
« Last Edit: May 21, 2015, 10:32:51 am by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
I think there are two points in this discussion that needs seperation:

 -  Compiler
 -  IDE

I have used the Keil and IAR compilers the last years on the job and both are excellent IMO.

The IDE is a personal preference, and you can use Eclipse on top of Keil or IAR as long as you let it call the make files or scripting, works fine.

Debugging is different there you will have to use the compilers IDE AFAIK  :-// .
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
I think there are two points in this discussion that needs seperation:

 -  Compiler
 -  IDE
The correct term would be:
-Project Environment, the makefile.
-Editor, with the fancy autocomplete and syntax highlighting and analysis.
-Toolchain, the compiler/linker/debugger
An IDE features all of them in one Integrated Development Environment.
Eclipse is only the first two, and is molded into an IDE by anyone interested, to get LPCExpresso, Chibistudio or CodeWarrior.
Keil uVision is an inseparable IDE. (due to licensing you cannot use the toolchain without project environment)
 

Offline Christe4nM

  • Supporter
  • ****
  • Posts: 252
  • Country: nl
I read through the thread and just for a clear discussion: Keil (not Kiel btw ;) ) uVision 5 is the current version.

In the end what counts for me when deciding to put down money on such a product is what it costs vs. what it will solve. For example I bought a professional license for Altium because I want to focus on my job and don't want to tinker with the tool's inabilities and quirks. Not to say Altium or in this case Keil, IAR, GCC or Rowley tools don't have quirks, but when I run into a problem I pick up the phone, or if less urgent send a mail to the support team and they respond to get me going.
Be aware that costs you a yearly support fee. But for a company that should be next to nill compared what it costs if an engineer can't continue their work. Or for example when errors are made or overlooked due to characteristics of a certain tool.

That's also the way to sell it to the boss or CFO. It's an investment to gain in the end.

I'm a more of hardware guy, so if I really needed to spend a lot of time on firmware development I wouldn't hesitate to aquire one of the mentioned IDEs and look for middleware libraries that are proven and have good support. 

In the end it's your own opinion that matter a if a certain IDE works for you. So again: do test them.

On a final note, it is true that I do see a lot of MCU vendor provided example code and demos that have at least a version for Keil next to the vendor's own IDE.

edit: typos (stupid autocorrect)
« Last Edit: May 21, 2015, 09:04:38 pm by Christe4nM »
 
The following users thanked this post: awde

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2184
  • Country: au
While we're breaking it down to simple constructs there's

-Engineering and
-Business

Many an ideal engineering practice has been screwed over by business constraints and as this is, generally speaking, an engineering forum, I would of thought most would be espousing the virtues of knowing what the tools are doing, creating and how they are creating/translating their intentions in firmware rather than creating an idea in some high level abstraction, pressing a button on the toolbar and watching shit magically happen on your pcb.
The latter sounds more like a consumer tool than an engineering one
Investing time and money on knowing your engineering craft seems like good engineering to me :box:
 

Offline Christe4nM

  • Supporter
  • ****
  • Posts: 252
  • Country: nl
While we're breaking it down to simple constructs there's

-Engineering and
-Business

Many an ideal engineering practice has been screwed over by business constraints and as this is, generally speaking, an engineering forum, I would of thought most would be espousing the virtues of knowing what the tools are doing, creating and how they are creating/translating their intentions in firmware rather than creating an idea in some high level abstraction, pressing a button on the toolbar and watching shit magically happen on your pcb.

I have no idea if your post is a direct reply to what I said. But I'd like to elaborate anyway.
When it comes to design I would want my tools to work exactly as I need them to. In the case of a PCB design tool I need control from footprint to lengthmatching and everything in between. While I am in control so that I can do my design to the best I know how, I want a tool that works with me, supports what I want and fits my workflow in a way that enhances the process.
Now I am not really experienced when it comes to embedded programming. So all the more reason for me to want to know what's going on. While I focus on my task at getting my MCU running I need to know that I can trust my compiler. Moreover I want an IDE that fits my workflow so I can focus on getting my code designed to the best I know how without being frustrated by quirks of the tool. For me as not hardcore/fulltime firmware/software developer I don't have a need to know the depths of the IDE and compiler. My embedded programming colleagues however do. In that I completely agree with knowing what happens under the hood.

What I'm trying to say is that I'd rather pay (more) for the right screwdriver that never fails me so I can focus on where and how to put what screws in, instead of one that requires me to think about how to handle that &#%$! driver in such a way that it actually does the the job it was suposed to do in the first place: it should be an extension of my arm, right? (Please don't apply this example directly to any program mentioned in the thread as I intended this just as example)

Quote
Investing time and money on knowing your engineering craft seems like good engineering to me :box:

Agree 100%
« Last Edit: May 21, 2015, 11:30:05 pm by Christe4nM »
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
What I'm trying to say is that I'd rather pay (more) for the right screwdriver that never fails me so I can focus on where and how to put what screws in, instead of one that requires me to think about how to handle that &#%$! driver.
Unfortunately paying more doesn't always get you a better tool. Note the remark I made earlier about IDEs developed by compiler vendors are usually an afterthought. Power users usually have their own build tools and workflow in place so for them a vendor specific IDE doesn't add any value to the product.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2184
  • Country: au
I think it's reasonable not to want to futz around with the IDE. Unfortunately the IDE hides most of the compiler's workings (there's only so much GUI check boxes can conveniently do to handle all the command line flags and switches).
Understanding the compiler, assembler, linker and it's scripts, the startup file, library linkage etc, etc isn't something that will come for free when purchasing a commercial offering... This will take time regardless of wether you pay or don't as surely paid support doesn't cover not reading the manual
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
The correct term would be:
ok i stand corrected  :)

Personally I don't understand why Keil and IAR have to cost that much money. For a large business the cost can even be a major pain if you look at the Keil license agreements (no global licenses, so pay for each continent)
Esp. Keil which is part of Arm make their money from licensing the processor architectures the more free tools the more enthousiasts will jump on the wagon.
Probably they don't want to kill competition from other compiler vendors. :-//
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
How big is your program? because the free version of keil allows up to 32K I believe.
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
How big is your program? because the free version of keil allows up to 32K I believe.

Building things like these:
https://github.com/netduino/netmf
https://github.com/NETMF/netmf-interpreter

will not be an option, and is supposedly not working to well with gcc due to resulting size because of lack of optimizations. Maybe the newer gcc is better though.
Not tried myself, but others in discusionthreads have sort of convinced me that it would not work, so I haven't put time into it yet..
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
The latest ARM GCC (made by ARM) does optimise better but don't expect other tools to create smaller code. AFAIK ARM's own compiler is the only compiler which produces smaller code than GCC. I don't know if that still holds true for ARM's version of GCC.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Keil and IAR are expensive because they are made by people working at a company.
People are not free. A open source community is "free" and a foundation has paying members.
If you're ever done a PC software project you will know how much time goes into one, and into the support after it.

Keil could lower the price, but I doubt they'll expand their market. The market are mostly companies, and for companies keil isn't expensive.
For home users half the price is still too high.

For home, get gcc or get a sparrow license. (at your own risk of course)
It's a myth that arm-gcc is far inferior to rvct.
Here is someone comparnig them: http://tinyurl.com/nfa2qt5 (C compilers for ARM benchmark AN0052 - Raisonance)
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
What is the price level on IAR?

Crossworks seems to be in a better pricerange, everything up to $250ish I think is ok prices for hobbyists, at least I would pay that (unless you need to pay that each year), but $5000? no way.. :)

The newest netduino have an mcu with more memory, so it might not be an issue, I'm still waiting for it, plan is to try it after I get it. The point for netduino/micromf, is that its.. intepreted .net code, but one can hook up native code, if one recompiles the whole framework (seems like there are plans to make this easier later, so the problem might go away), but so far, for using say ws2812 strips, the best option is to go native like this: https://learn.adafruit.com/using-neopixels-with-netduino/overview
They refer to gcc there, but on the netduino forum, the promote the rvct(or some letters like that, atleast some old version), but I guess I need to just try gcc to see how far I get (They also say that they haven't made all code compatible with gcc, only some parts that they stopped maintaining for some time ago, if I understand them correctly)
Some comments about that here: http://forums.netduino.com/index.php?/topic/11856-native-development-options/?p=62730  but it's also discussed elsewhere on that forum.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
As an addition to my earlier post: A mistake often made is comparing code size results while using GCC with a standard C library inteded for desktop and server applications. The document linked to by Jeroen3 also steps into that trap. If you pair GCC with a small C library (or even a micro-printf) you can create really small code. This is also an area where commercial microcontroller compiler vendors try to make a difference compared to their competitors.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
As an addition to my earlier post: A mistake often made is comparing code size results while using GCC with a standard C library inteded for desktop and server applications. The document linked to by Jeroen3 also steps into that trap. If you pair GCC with a small C library (or even a micro-printf) you can create really small code. This is also an area where commercial microcontroller compiler vendors try to make a difference compared to their competitors.

Ok, so libraries follows the compiler/toolchain, not the mcu?, so it can just as well be an bloated gcc library that gives the codesize?

In old old day, one had compilers that optimized and linked in only code that was used (I used TopSpeed modula2), and thus could reduce codesize, isn't things implemented like this in the mcu world?, or is it because the architecture of the libraries ties in too much so one cannot optimize out all unused code in the linking?
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
The linker does not include unused functions. Still, many of the functions themselves - which you have used - are quite large when intended for desktop applications.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
As an addition to my earlier post: A mistake often made is comparing code size results while using GCC with a standard C library inteded for desktop and server applications. The document linked to by Jeroen3 also steps into that trap. If you pair GCC with a small C library (or even a micro-printf) you can create really small code. This is also an area where commercial microcontroller compiler vendors try to make a difference compared to their competitors.
Ok, so libraries follows the compiler/toolchain, not the mcu?, so it can just as well be an bloated gcc library that gives the codesize?
Yes. Fortunately the ARM GCC targetted for microcontrollers (maintained by ARM) comes with a microcontroller C library which itself has two flavours: regular and nano.
https://launchpad.net/gcc-arm-embedded
The Readme.txt has a paragraph about choosing libraries: https://launchpadlibrarian.net/200699979/readme.txt

Quote
In old old day, one had compilers that optimized and linked in only code that was used (I used TopSpeed modula2), and thus could reduce codesize, isn't things implemented like this in the mcu world?, or is it because the architecture of the libraries ties in too much so one cannot optimize out all unused code in the linking?
Every linker I know only links in functions from a library which are actually used. This depends on how the library is compiled though (each function should be in it's own 'section').

There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf