I wanna dive into the matter and learn Embedded Systems. I am waiting for this board. I've read some blogs, earlier posts on this topic, watched some videos and I have a couple of questions:

  1. Does one have to be an expert in C to start learning this | learn all the C Programming stuff before Embedded Systems or can we pick it up along the way?

  2. As far as I saw, I would start learning it at register level. I read about what that would kinda mean, and that's the way I would like to learn it. I mean, learning how to work with registers would make me a better professional, I suppose.

  3. I found no course on this stuff, except for a new release on Udemy, by 'Mutex Embedded' . I have no idea if that's a good course. Has any of you taken it?

  4. I found some books on General Embedded Systems, or Embedded Systems with xxxxx, but using other languages, boards, approaches, and so on. But nothing like 'STM32 register level programming', using (embedded) C. Isn't that common?

PS: 'Beginning STM32', or 'Making Embedded Systems' seemed to either not be the approach or level I'd like or be too general. Is it really like this?

I am gonna take Control Systems now, and would like to learn some Embedded Systems. That's why.

  • \$\begingroup\$ To become an expert of C you need some 10+ years of full time C programming experience. It's a dirty, irrational language with lots of pitfalls. You do however need do have gone through some basic C programming courses. I wouldn't really recommend learning C through embedded systems, most learning material out there is written for PC environments and it's easier to verify your programs when you can simply print stuff on a screen without having to code the whole display driver etc first. \$\endgroup\$ – Lundin Jan 26 at 12:39
  1. You don't have to be an expert in C. But it helps if you are, because sometimes in embedded systems things are done with slightly different mentality compared to how you would do it on PC. The C is still same, but you don't have a familiar OS running the code, as there is no OS at all, or there is some RTOS. Have a C reference at hand. But there is so many other things to learn too than just C. You have the IDE or other environment to write and build code, to download and run and debug the code running on MCU. And the MCU itself, at register level, or at the HAL level provided by manufacturer, or the electrical datasheet level, or assembly instruction level.

  2. For reasons I said above, forget starting from registers. Install CubeIDE and start working. You should be able to compile, download and run a demo program within few minutes. It helps if you are familiar with Eclipse-based IDEs.

  3. Not familiar, no comment.

  4. Manufacturer has all the register level details in the MCU Reference Manual. You don't need any tutorials, the information is already there.

  • \$\begingroup\$ So, the beast, as you called it haha, is very complex, I read about it, but I can't return the H7 now, I will have to start with it haha; but lemme see if I follow your points: I should start with the support from an IDE, right? (When I bought the board, there was something on the one you mentioned, that already has a built-in compiler and so on.) So, what would that mean? Program the MCU in Embedded C using the IDE to write, compile and upload the code? OK! Once I am comfortable with that, then start going through the ref and learn how to deal with registers? Thanks for your response 🙏🏼 \$\endgroup\$ – Kelarov Jan 24 at 14:42
  • \$\begingroup\$ "sometimes in embedded systems things are done with slightly different mentality compared to how you would do it on PC" -- I would put strong emphasis on that aspect of it. Embedded C is often simple in comparison, but very detail oriented. Many of the foundational elements of PC programming, like dynamic allocation, recursion, elaborate data structures etc, should pretty much never be used in high reliability embedded code. This is not to say you must "be an expert", but you will be forced to become one sooner than you would on the PC side, albeit in a niche specialty. \$\endgroup\$ – Pete W Jan 24 at 22:06
  • \$\begingroup\$ I wouldn't really recommend Eclipse to beginners or to my worst enemies. It should be enough of an argument that the debugger is truly awful and not designed with embedded systems in mind. Sure, there's an interesting race between ST, NXP, Silabs and other Eclipse hellspawns about who can produce the most horrible programming IDE of all time, all categories. But we need not witness that competition in first person. Especially if we are beginners who just want to blink some LEDS, rather than trouble-shooting mysterious linker error 666, process returned 1. \$\endgroup\$ – Lundin Jan 26 at 12:47
  1. You can (and i recommend you should) learn C along the way of developing. This will help you learn the parts of C that are important for developing in embedded systems. For example you may not need to learn classes (structs in C).

  2. Yes, learning how to write directly to registers will make you a better programmer. The hard part on that, is to find tutorials. (I started learning embedded systems using registers on Arduino (Atmega328p mcu) since it had so many tutorials, i learned fast and a helpful community. I would recommend starting with that though. I have made a gitlab tutorial with everything i know about it.

  3. I am trying to find good courses that utilize registers on STM32 mcus as well, like 3 months now. I know that there are the LL (low level) libraries that can be used to write on the register level. But i cannot find any good tutorials or anything. (Also consider STM32 are usually 16-bit MCUs so its 'harder' to play around with registers. Instead, the Arduino MCU is 8-bit hence easier for a beginner.

  4. As i said, arduino (aka MCU Atmega328p) is -i think- the most common one, supported on forums like AVR freaks and a lot of material online, as well as video tutorials

So, i would recommend to start with arduino, and also if you want, start by learning Arduino IDE (that uses C/C++ and its easier to start with) to have a general idea and start easier, and then head to Using the registers (using AVR-C libraries, which are the formal libraries to write in registers)

  • \$\begingroup\$ - Yes, exactly. I will have to learn C++ anyway, but (pure) C, I'd like it to be more embedded-focused and leave all the higher-level stuff to C++ - Structs, Classes and all the OOP stuff. - Tbh, I wouldn't like to start with Arduino, for I think it's way too high, making you do stuff w/o really understanding them, since there are all those libraries and built-in stuff to ease the process, but as you said, there isn't much stuff on register prog for STM32. I'll keep on searching, but if I can't find, then I will have to start with ATMega. I'll also check the GitLab link. TYSM \$\endgroup\$ – Kelarov Jan 24 at 13:24
  • 1
    \$\begingroup\$ I'd like to disagree on #2. Starting embedded learning on a such complex beast like H7 will end up in a disaster if starting learning from how to write registers on your own - expect spending a week even before a LED blinks at the right frequency. That is why there are manufacturer libraries to simply start developing the application, and then move on to direct register writing. It would make sense on an AVR which is dead simple.Tutorials for register writing (on H7) does not exist, because nobody starts from that, and besides all you need to know is in the MCU reference manual. \$\endgroup\$ – Justme Jan 24 at 13:54
  • \$\begingroup\$ Now that you mention it @Justme you are right. Starting with registers on a complex mcu is hard. \$\endgroup\$ – Christianidis Vasileios Jan 24 at 13:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.