2019-01-30 11:05 AM
Hello everybody!
I've been watching/reading this forum for a while now, trying to enlighten myself, but without success. So, this is my first question...
While not being new to electronics, microcontrollers and programming, I am new to ARM. I've spent the last (more than) two weeks reading hundreds of pages (reference&technical manuals, etc.), forums, blogs, tutorials, you name it! At the end of all this, I thought I understood something... but it looks like the more I read, the more overwhelmed and confused I am... Anyways, I tried to apply my new and hard gained knowledge by writing some simple programs.
But how?! The some chaotic (to me) mountain of information about these micros, reigns in the software domain too. There is a myriad of IDEs and command line tools to choose from, then HAL/LL/Standard Library, etc. I've tried quite a few of them (Keil uVision, Eclipse, Cube[F1|MX]) without great reasonable results.
What I am trying to achieve is some intimate knowledge of the peripherals of these amazing micros and a set of software tools that would allow me to write decent programs for them. It would be great if the software would be able to simulate the programs, so I can run them step by step and... observe and learn!
I've purchased already a few boards (STM32F1 Value line discovery, STM32L476 Nucleo-64 and a couple of BluePills w. STM32F103C8T6), a Logic Analizer, a scope, etc. In other words, I'm ready! Only my mind refuses to participate!
And here come the question: where/with what should I start? what should I read/learn and, more important, what should I not? what tools do you recommend (I know this is a hard one)? By the way, while I use Ubuntu daily and I am not allergic to command line tools, I would prefer Windows and an IDE... Not because I don't hate myself enough, but because at least now, while learning, I'd like to be focused more on the controller itself than on the tools.
I apologize for the length of this post (it shows my frustration) and I'm looking forward to hearing your opinions!
Many thanks in advance!
Solved! Go to Solution.
2019-01-31 02:18 AM
The StdLib is dead, at least for current MCU variants.
For the F100 (the Vl Discovery) you could still get it, but in your case, I would rather switch to to LL variant.
You are in control of your application framwork and resources (with CubeMX, you are clearly not), and not bound to the few use cases properly implemented by the code generator.
If portability is of no specific interest to you, you can get directly into Jan's direct-register-access coding style.
2019-01-31 02:40 AM
I've heard about this STL, so I'll not waste any time with it.
I'm not crazy at all about these bloated code generators, Arduino style. As an example, I've compiled an empty project - just initializing GPIO and USART, w. O3 - with HAL and LL. The code size with HAL: ~10K(!), LL: 2.7K - it tells it all!
I was also thinking about LL level. It is still high enough for me, more efficient and more in control. But an LL project can still be generated from CubeMX (ver. 4.23: Project Settings\Advanced Settings), right? Or, can I leave CubeMX out altogether?
Thanks!
2019-01-31 03:22 AM
> Or, can I leave CubeMX out altogether?
The question is not if you can (of course), but if you are willing to.
With an interest in details and full comprehension, it makes absolute sense.
Not to mention, many companies look for capable SW developers, not point-and-click code monkeys.
2019-01-31 03:53 AM
Okay, so if I understand what you wrote above correctly, you got blinky working through CubeMX and don't know how to proceed. This is exactly what I'm talking about. And even if you'll learn all the Cube's lingo and whereabouts, you'll have hard time from time to time to synch all that to the manual.
On my webpage efton.sk/STM32 there's a bunch of raw earth examples; the 'L476 blinky should work on the L4 Nucleo, maybe with a bit of tweaking. From there on, the path is through straighforward reading the respective chapters in the reference manual.
JW