Author Topic: Which IDE for STM32F4??  (Read 15211 times)

0 Members and 1 Guest are viewing this topic.

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8168
  • Country: fi
Re: Which IDE for STM32F4??
« Reply #25 on: November 12, 2017, 11:32:02 am »
My customer, after all, is paying for (say) an STM32 project with a boot loader and some reserved Flash memory for persistent configuration settings - not three weeks learning where to put the dots in the right place in a linker script.

On the other hand, once you have done it a few times, you start to understand how it works, and after that, something great happens:

gcc, ld and make (and gdb, but I don't use debugger very often) have been there for decades, and there are no signs whatsoever that they would be phased out in the MCU development; quite the opposite, everybody seems to be migrating towards them (as a backend).

Now, if you know how to use them directly, you are free from the confusion caused by:
* Multitude of totally differently working IDEs depending on which product family you end up with
  -> knowhow of direct usage of GNU tools allows you to better jump between families
* Changing "this years trend IDE" culture
* New versions working differently to the old ones
* Front end bugs
* Front end doing things people "usually want" behind your back

I admit this is kind of idealistic and simplified goal, but I took the bullet and am very happy right now that I did.

The one guy who recently did the massive and totally awesome comparison of sub $1 MCUs of 2017 got me thinking: there must be a better way. Most of the article was comparing how the development flow of writing C code goes in different product segments even though it was basically all doing the same job: writing C code. Today, we depend too much on code generation and tools that assist typing, when we should concentrate on creating high-quality code, including high-quality headers, libraries etc. that solve the problem on the source level (C is good enough for that, really!) instead of interactive text editing level.

So really, I feel like this is an issue where:
* Direct, raw use of the backend tools have a steep learning curve, but it really gives valuable experience, and it really gets easier after that (I'm surprised at this myself):

Code: [Select]
    +---------------------------
    |
    |
    |
    |
    |
    |
    |
    |
----+

* Using them through IDEs softens the learning curve quite a bit, but then you need to keep learning new IDEs, new details about them, and, worst, each time something doesn't quite work out automatically, you are yet again looking for help how to solve it through that IDE.

Code: [Select]
                                        +------------
                                        |
                            +------------
                            |
                +------------
                |
    +------------
    |
----+

Yes, I fought about half a year to get the understanding how to use the backend tools directly and separately.

But after that, it has been extremely simple, in fact, FUN, to do things people often consider difficult, like building custom bootloaders, utilizing secondary scratchpad memories, relocating vector tables, doing persistent flash storage, etc., all without help of device-specific libraries or device-specific tool documentation. In fact, if I had to do it the way people "usually" do it, I have no idea where I'd even start. There is no standard way. The way I do it is closest to universal, and anybody can modify the code and just run make without configuring anything, without having to install and learn the right "development environment".

The funny thing is, all the pain and agony I went through could be easily fixed just by writing some basic tutorials, with simple examples. But since very few people are seeing it from the same viewpoint as I am, no one writes it (except that Swedish Ubuntu guy who made it too complex and had it completely wrong :). Still, I'm very grateful). (It's worth noting there never was any issue with the actual installation of the tools; my source files were faulty since I had no idea how to do them - but now I have. It's great when you don't depend on the actual tool installation being right, but everything is contained in your actual sources as much as possible!)

But everyone writes tutorials on what IDE buttons to click - which should be something not needing an explanation at all if the IDEs were properly designed to do the job they exist for - be an user interface to soften the backend usability.

--


Today, my customers are paying for experience, so I want to gather even more of it. After being a hobbyist for a long time, I started at very low hourly rates, barely getting something to eat, in non-time-critical projects, gaining experience, compensating for the fact that sometimes I was stuck, maybe for weeks, learning how to do it in a sustainable way, instead of just doing a "quick solution". Now I consider myself "mid-experienced". I'm starting to see the extrapolation that after a few years, I can provide very quick, flexible services exactly because of the experience and knowhow, relying on any specific tool as little as possible - I never want to be a one trick pony. (OTOH, you have to rely on something; but I find it's much more sustainable to understand and memorize a few common gcc flags, than to understand what hidden buttons to click in a this years favorite IDE to achieve the same, or to depend on code generation tools, which tend to be seriously broken year after year.)

But I understand very well that talking about steep learning curves and giving promises like: "it will get easy after that big mountain!!" is not motivating. In school we were learning the German language, and our teacher mostly wanted to focus on all the details of grammar, making it sound more complex than it really was, and people didn't like it. We were given motivational speeches roughly like this:

"After this grand grammar hurdle, it gets super duper easy and we'll have fun speaking German fluently and everybody's singing and dancing in class".

But when the same pattern repeated year after year, we realized that the fun times weren't coming, the "big mountain" was always in the front of us, again and again.

So I promise, going without any IDEs will get easy, unlike our German classes! Trust me ::)..... or maybe just follow the majority and forget about what I'm doing. Maybe I just like to work differently.
« Last Edit: November 22, 2017, 07:08:53 am by Siwastaja »
 
The following users thanked this post: cdev, IuriC, newbrain, hermit, emax

Offline CM800

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: Which IDE for STM32F4??
« Reply #26 on: November 12, 2017, 06:23:56 pm »
I've really enjoyed using Visual GDB, very reasonably priced + student discount.
 

Offline emax

  • Contributor
  • Posts: 34
  • Country: de
Re: Which IDE for STM32F4??
« Reply #27 on: November 15, 2017, 07:45:48 pm »
I haven't seen which platform shall be used.

I am on linux.

> A capable text editor of your choice, make, and gcc.

Agree. I use emacs as my "IDE" and for everything else. Even for the current C++ project (> 340k lines of code).

Siwastaja is totally right: It takes a while to get through all those backend-tools, make, scons, the gnu compolier, the linker whatsoever. But once you've made it, you're the king of the build.

There is gdb, which has no buttons and no 'klicki-bunti' gimmicks, but it is very powerful. There is etags/ctags for quick-finding references. There is tags-query-replace, doxygen and a zillion other things which completely substitute and even outperform nowadays IDEs in terms of speed and flexibility.

I am doing this for a living, and after having had a lot of hassle with new eclipse-versions, died IDE-projects, missing packages for a particular platform and many other obstacles, I decided to throw away all those fancy and smart IDEs, and to just use the basic things you really need.

To be clear: I am mainly developing server-things. But the surprising thing was, that I was quickly able to adopt my knowledge to any embedded platform as well, and it took only very little time. I did this for stm32F104, for the 8051 family, and for ATmegas as well: Though there are variations, it is always the same workflow. I do not any more depend on code::blocks, netbeans, avrstudio, visual studio and all those other monsters (Eclipse basic-installation was more than 500 megabytes already then 10 years ago). I can even develop java-applications that way, always based on the same procedures and knowledge. There, you might use ant instead of make or scons, javac instead of gcc or g++, jar instead of linkable libraries. But the conecpt always stays the same and that makes you widely independent from any IDE - policies and compatibility issues.

The only thing I was really missing was the code-coverage feature from Keil/Franklin. But I am quite sure, this can be done within the toolchain of emacs/gnu-c and c++/ld as well - if I'd spend the time to collect the tools.

However: Just learning emacs is already a major task. One can use it within an hour, ok. But unleashing all the power is a thing I haven't yet completely mastered - after 25 years of utilization (my first emacs was version 17.36, today I use 24.5.1). It is in any case a long-term-investment which pays off.

Stunningly, the editor works basically still the same after a quarter of a century. This tells a lot.

But it's not only about the editor. I can combine any compiler with it, any build-system and any flash-loader. It can even run under windows (though not fun), it runs under solaris, aix and any *ix platform I know.

Yes, there is no 'setup.exe'. But it's worth the effort, and I encourage everybody to give it a try (though one should be stubborn enough to overcome the unavoidable frustrations which this might bring at a first glance).

And by the way: If some package or library is missing in a toolchain, it usually takes less then five minutes to get this installed from the repositories in question.

And the community is tremendous - and beats any hotline.

And now you know where my nickname comes from.  ;)
« Last Edit: November 15, 2017, 07:50:35 pm by emax »
 

Offline emax

  • Contributor
  • Posts: 34
  • Country: de
Re: Which IDE for STM32F4??
« Reply #28 on: November 16, 2017, 01:01:08 pm »
I want to second Siwastaja once more:

Quote from: Siwastaja link=topic=97948.msg1347478#msg1347478
...
gcc, ld and make (and gdb, but I don't use debugger very often) have been there for decades, ...
everybody seems to be migrating towards them (as a backend).

This depicts depicts a problem of which many developers are just not aware: Compilers evolve with increasing speed. And in particular the c++ world is affected by a number of changes which makes it hard for companies like Keil/Franklin (is it still Franklin?) to keep up with the progress.

It is simply too expensive to maintain an own compiler in that way that they can compete with the latest features of benchmarkers like g++/gcc. Ask them for C++11, C++14, C++17 or C++20. I don't believe that they will be able to support all that new stuff.

Keil-C is a ultra-high optimizing compiler, probably more than gnu-c can be - as long as you look at the 8051 family. I do not know whether the arm-optimization is similarly good. But if it comes to more general requirements, and this is what I guess will become more and more important, the may be quickly out of the business. Software is nowadays a much more complex and costly thing than it was in times of a 'closed' embedded solution somewhere in a metal-box.

Today, IoT is there, and zillions of embedded appplications will require connectivity and web-interfaces and the like in the future. I doubt that highest code-optimization will then have such a strong priority than connectivity and versatility. Processors are faster today, have more ressources and different challenges than a decade ago.

To come back to topic: I guess, that going more and more to gnu-backends is kind of a capitulation in face of these trends. Why invest in a never ending-challenge if the solution is already there? The times of making money whith proprietary (non-) standards (Keil) is over in the open-source-software world.

The conclusion is -of course- simple: Join the winners. I wouldn't (yet) say is such hard, but the basic message is perhaps "If you are sitting on a dead horse, you should dismount."

As opposed to a (proprietary) IDE, an editor, a debugger and a de-facto standard compiler is timeless. It will always be the core of any workflow.

« Last Edit: November 16, 2017, 01:16:01 pm by emax »
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Which IDE for STM32F4??
« Reply #29 on: November 16, 2017, 05:13:49 pm »
This depicts depicts a problem of which many developers are just not aware: Compilers evolve with increasing speed. And in particular the c++ world is affected by a number of changes which makes it hard for companies like Keil/Franklin (is it still Franklin?) to keep up with the progress.

It is simply too expensive to maintain an own compiler in that way that they can compete with the latest features of benchmarkers like g++/gcc. Ask them for C++11, C++14, C++17 or C++20. I don't believe that they will be able to support all that new stuff.
Even to this day Keil have zero plan on supporting anything newer than the partial support of C99 in their compilers. The new ARMCC version 6 is really LLVM with a Keil branding and retargeted assembler. For me accumulated code since a good portion of it uses C11, I am locked out of Keil toolings and have to use GCC, LLVM or SDCC (for 8051.)
Keil-C is a ultra-high optimizing compiler, probably more than gnu-c can be - as long as you look at the 8051 family. I do not know whether the arm-optimization is similarly good. But if it comes to more general requirements, and this is what I guess will become more and more important, the may be quickly out of the business. Software is nowadays a much more complex and costly thing than it was in times of a 'closed' embedded solution somewhere in a metal-box.
There was a benchmark by Raisonance indicating that in most likelyhood Keil is the worst performing ARM compiler. GCC on the other hand is striking firsts in a good selection of benchmarks. GCC suffers from an less optimized C standard library but that can be done away with much easier than compiler itself being underperforming.
Today, IoT is there, and zillions of embedded appplications will require connectivity and web-interfaces and the like in the future. I doubt that highest code-optimization will then have such a strong priority than connectivity and versatility. Processors are faster today, have more ressources and different challenges than a decade ago.
People even put Python and Lua onto microcontrollers... I think the efficiency argument is long out of the window when Python comes in play.
To come back to topic: I guess, that going more and more to gnu-backends is kind of a capitulation in face of these trends. Why invest in a never ending-challenge if the solution is already there? The times of making money whith proprietary (non-) standards (Keil) is over in the open-source-software world.

The conclusion is -of course- simple: Join the winners. I wouldn't (yet) say is such hard, but the basic message is perhaps "If you are sitting on a dead horse, you should dismount."

As opposed to a (proprietary) IDE, an editor, a debugger and a de-facto standard compiler is timeless. It will always be the core of any workflow.
I second that. Although if you really want to use an IDE (for example if you us symbolic debugger a lot like I do) you can try stock Eclipse CDT plus GNU MCU Eclipse plugin, managing the GDB debugger.
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
Re: Which IDE for STM32F4??
« Reply #30 on: November 16, 2017, 07:12:40 pm »
I use emacs as my "IDE" and for everything else. Even for the current C++ project (> 340k lines of code).

Me too.  :-+  I've been using emacs regularly for the past 30+ years. I used to have two screens (27" Apple displays) at work and people would occasionally stand behind my desk and mumble when I had 8 emacs panes covering each display.

The only recent problem I've run into with emacs as a development environment is getting it to mesh nicely with Clang/LLVM. Specifically, the support for LLDB isn't great (and R. Stallman believes LLVM is evil), so debugging C++ on macos is not quite as easy as I'd like.

For embedded work, I've been using Segger's Ozone since it came out. It provides a really useful graphical debugger. The GUI part works well (even to my text-mode eyes) because it lets me see register contents and disassembly in real time. IMO, Ozone and J-Link are better than the openocd+gdb combo that I used to use.

Maybe we should start an emacs thread. ;-)
 

Offline hermit

  • Frequent Contributor
  • **
  • Posts: 482
  • Country: us
Re: Which IDE for STM32F4??
« Reply #31 on: November 16, 2017, 08:08:17 pm »
Maybe we should start an emacs thread. ;-)
Make it vi and I'm in. ;)
 

Offline IuriC

  • Contributor
  • Posts: 33
  • Country: br
Re: Which IDE for STM32F4??
« Reply #32 on: November 17, 2017, 03:12:37 am »
Quote
The funny thing is, all the pain and agony I went through could be easily fixed just by writing some basic tutorials, with simple examples. But since very few people are seeing it from the same viewpoint as I am, no one writes it

It's really sad that no such tutorials are easily found... I did pass the same experience too.
 

Offline Arjen_Arg

  • Contributor
  • Posts: 13
  • Country: ar
Re: Which IDE for STM32F4??
« Reply #33 on: November 22, 2017, 03:41:36 am »
yeah, you guys got us all hooked, make that tutorial!  :clap:
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Which IDE for STM32F4??
« Reply #34 on: November 22, 2017, 07:19:35 am »
yeah, you guys got us all hooked, make that tutorial!  :clap:
I am going to write one but on my blog. Will update once I get the posts up.
 
The following users thanked this post: emax, Arjen_Arg

Offline IuriC

  • Contributor
  • Posts: 33
  • Country: br
Re: Which IDE for STM32F4??
« Reply #35 on: November 22, 2017, 10:49:59 pm »
yeah, you guys got us all hooked, make that tutorial!  :clap:
I am going to write one but on my blog. Will update once I get the posts up.

Remember to post it here too!  :-+
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Which IDE for STM32F4??
« Reply #36 on: November 23, 2017, 05:21:57 am »
yeah, you guys got us all hooked, make that tutorial!  :clap:
I am going to write one but on my blog. Will update once I get the posts up.

Remember to post it here too!  :-+
I will only post links here, please read on my blog. (I don't have ads yet, but good analytics will boost my chances of negotiating a better deal.)  ;D
 

Offline Totoxa

  • Newbie
  • Posts: 9
  • Country: cl
Re: Which IDE for STM32F4??
« Reply #37 on: November 23, 2017, 07:35:06 pm »
I use Code::Blocks for PIC18 and ARM's programming, works fine and its lightweight
 

Offline humbug11

  • Newbie
  • Posts: 5
Re: Which IDE for STM32F4??
« Reply #38 on: November 29, 2017, 10:44:21 am »
I use Qt Creator with external make files. You can set it up to use GDB for debugging, it's quite neat.

Sent from my A0001 using Tapatalk

 

Offline Arjen_Arg

  • Contributor
  • Posts: 13
  • Country: ar
Re: Which IDE for STM32F4??
« Reply #39 on: November 29, 2017, 04:06:06 pm »
I'm giving Eclipse + GCC a shot. So far I'm finding it interesting, but way more complicated to setup that the usual all in one compiling debugging IDE. I guess it boils down to how much time you have to invest in the journey. I have used IAR for STM32 before, the interface is horrible, but it's easy to get started. I'm moving away from that because of the code size limitation.
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Which IDE for STM32F4??
« Reply #40 on: December 01, 2017, 08:19:50 am »
https://en.maxchan.info/arm-development-with-eclipse-cdt-part-1.html

The first part of my GCC+Eclipse STM32F4 tutorial. This series will cover environment setup, processor startup (without assembler,) SysTick, GPIO, serial port (with newlib stdio support and thus printf,) I2C, SPI, FSMC EBI and USB, all without touching the ST libraries.
 
The following users thanked this post: Kjelt, emax, Arjen_Arg


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf