The cheapest STM eval board to get started with C++ embedded programming

It's a while I've been getting started with embedded programming using modern C++, and now have got a couple of questions:

1) First I need the cheapest STM evaluation board to install ST-CubeMX and try to make sure that I can "connect" to the board via JTAG. All these are new for me and I want you to do me a favor and suggest some boards with the above specs, please.

2) I've got a book called Real-Time C++_ Efficient Object-Oriented and Template Microcontroller Programming 3nd Edition which is using C++ 17 for embedded apparently but it looks advanced and doesn't suit me well at least for now, I suppose. I'm going to study it gradually as I gain more skills on C++ embedded. Any opinion?

3) Apart from these two, I'm watching a series on YouTube: https://www.youtube.com/watch?v=1Kjh0CAgnl4&list=PLPW8O6W-1chwyTzI3BHwBLbGQoPFxPAPM&index=5. The link above is assigned to a lesson on how to make an LED on and blink. Even though the series is useful indeed and (to some extent) teaches how to read datasheets, I feel rather blue about this series, not only because it's of 2013, but also because it's actually for C not C++. Do you agree that I should tune it out and stick more with the two items I talked about on questions 1 and 2 above?
Last edited on
1. You haven't given enough information to select an evaluation board. Why did you pick "ST-CubeMX"?

2. After a quick scan of a previous edition of the book, it looks like reasonably good book (for the subject). But I'd recommend you stick with reading the book page by page, don't try to jump around in the book. But you do need to realize that the book is probably not really for a beginner in C++. If you already have the book you may want to see if the book recommends any particular hardware.

3. Well learning how to read datasheets is quite important in the embedded world.

I feel rather blue about this series, not only because it's of 2013, but also because it's actually for C not C++.

Do you realize that a great majority of embedded work is done in C and that C hasn't changed much since 2011? In constrained (memory, code size, etc) systems even if there is a C++ compiler ported to the microprocessor the compiler may not implement all of the C++ (or C) standard. For example the std::iostreams (or cstdio functions) may not be implemented due to lack of standard input or output systems in the hardware.

Do you agree that I should tune it out and stick more with the two items I talked about on questions 1 and 2 above?

Not necessarily. There are a lot of different microprocessors than the ST32 series of microprocessors that may be more suitable and perhaps even cheaper alternatives. Also normally one first chooses the microprocessor/evaluation board before choosing the software.

Thank you for your profound reply.

1) The model of the board was indeed recommended by an experienced guy so that I'm almost confident working on it may be hard for me at the moment but will be very worthwhile and good experience for gaining knowledge of that after, say, making its LED blinking. So I like it albeit it's hard. :) You, if possible, just suggest me a few number of those boards from the cheapest onward and I try to pick one up.

2) Yes, the book looks amazing and sure I won't jump through its pages; I focus on its contents and progress page-by-page solely.

3) About C and its usage on embedded on the one hand, and using C++ for that area with its modern features, capabilities and constraints, on the other hand, I suppose I'm familiar with the two well enough. :) I've watched a couple of technical talks on YouTube and feel that I know how modern C++ can be used significantly on embedded and better than C. To put in a nutshell C++ >= C and it greatly hinges upon the developer how to make advantages and avoid improper code for the target device using C++.
if you are a raw beginner, there should be some virtual, emulated boards you can program the emulator including setting up some of its wiring, without having to buy & fry. Later you can buy something but see what you can do on the cheap with a virtual device? My entire first class in chips / hardware was done on emulators... and that was a very long time ago.
Last edited on
Wow, that's amazing. Yes, I'm a beginner on C++ embedded. What emulated boards do you suggest that I use and which one is popular to you, please?

By the way, do you suggest that I install the emulator on my Linux machine and it doesn't matter on Linux or windows at least for now?
Last edited on
closed account (z05DSL3A)
frek, I thought you may find this interesting.
https://www.youtube.com/watch?v=pTcX1GD1uTQ&list=PLs3KjaCtOwSakLqW6FyrJ23QycIb-JLDL
What exactly do you mean by "embedded"?

What exactly are you going to try to do with an "embedded" system?

As for simple, low cost systems a Raspberry PI 4, is, IMO, a decent starting point for a system with an OS. For simple low cost micro-controllers there are many many different choices, the choice you make should be based on what you want to try to control. For example Silicone Labs has quite a few low cost development boards ranging from a couple of dollars to several hundred depending on features. For example :

https://www.silabs.com/mcu/8-bit/efm8-busy-bee/device.efm8bb10f8g-qfn20#software
https://www.silabs.com/mcu/8-bit/c8051f00x-f01x/device.c8051f000#software
https://www.silabs.com/mcu/8-bit/efm8-laser-bee/device.efm8lb12f64e-qfn32#software

To name but a few.

And don't forget there are the Arduino, and the ST Micro boards along with many many other development boards of different types.

So the first thing you need to decide is what you want to accomplish/learn from the embedded world. Then pick your poison and go for it. I would recommend that you try to stay simple at first.

I am out of the embedded world for 8+ years. I have no idea what the best choices are currently, but I can assure you that most of the popular stuff should have an emulator and maybe a simulator.
- emulator is a virtual device, as if you had the chip and/or board. EG phone devs work this way, with virtual phones on your PC.
- simulator represents externals that you plug into your embedded device: you set it up to produce current or data on wires that go into the emulator. Not all systems have this.

- some of these tools will be free, and some will require you to buy into their SDK or something. The hardware guys WANT you to make stuff on their systems so they frequently do offer it for free.

The low cost couple of bucks boards may also be good but the thing is, you can short out this stuff and you WILL do so early on if you are not exceedingly careful. After a bit you will see what I mean and stop putting the system voltage on the data input wire or whatever oops moments you may run into. You can't short out the emulator, it just tells you you screwed up.
Last edited on
@Grey Wolf
Thank you for the link. Yes, it's interesting but seems advanced and not suitable for me now.

@jlb My desire will most probably be the popular MCU called ARM Cortex-m, for instance, but now I have no idea about how to use C++ to program and deal with it.
Thank you for the links, but the thing which is a shade odd is that why are they all 8-bit? Probably because it's better for me to start from them. But one thing, will you please introduce a few cheapest boards based on what I mentioned in italic on the question #1 line of my first post above? I like to start by one of that category and will try hard to handle it and make its LED blink by studying the book I mentioned in question #2 of the first post above. The first program in that book is about making an LED blink as well.

@jonnin
So for the time being I have two good options at hand.
1- The cheapest STM evaluation board I talked about. But I must be very careful on working on it.
2- An emulator which can be fine and protected against risks a beginner like me make make on it.

I really like to work on the board I talked about but if I want to test an emulator what exactly should I search, for example? Something like: "emulators for modern C++ embedded" or "emulators for STM boards" or even "emulators for ARM Cortex-m"?
Last edited on
But one thing, will you please introduce a few cheapest boards based on what I mentioned in italic on the question #1 line of my first post above?

You said "The model of the board was indeed recommended by an experienced guy", so I recommend you ask that "experienced guy" for some recommendations.

but the thing which is a shade odd is that why are they all 8-bit?

I pointed out those products because you said you wanted something cheap and easy. The products I pointed to (3 from several dozen from that manufacturer) are both cheap and IMO are very easy to learn.

The first program in that book is about making an LED blink as well.

Yes, so? Almost any micro-controller can "blink" an LED, but they will all probably need slightly different code to "blink". If you intend to follow that book religiously you really need to find out what processor/development system the author is using, otherwise you will need to reinterpret the code and wiring for your particular system.

By the way "embedded" systems are more involved than just "programming". You must know a little about electronics as well (the more the better) since you will need to wire components to your processor before you can actually program them.

Oh, and the author of that book hints that most, if not all, of the "projects" in the book can be handled by an 8 bit processor.

My desire will most probably be the popular MCU called ARM Cortex-m, for instance, but now I have no idea about how to use C++ to program and deal with it.


Again until you really decide what you want to do picking one particular processor is a bit premature (IMO). Decide on what you want to do before you limit yourself to one particular system.

One of the reasons I also suggested the Raspberry PI is that this board has a header file for some input/output pins and there is a lot of different projects that you can play with without needing to worry about cross-compiling code on one processor for another processor. You can use one of many different IDE natively on the PI making it much easier. Also there is a ton of excellent documentation for this board, and lots and lots of different projects available to try, from simply toggling a led to communicating to another system thru one of several different methods. The PI was designed with the "novice student" in mind and their primary focus is students. And by the way the PI is using an Arm Cortex Microprocessor.



closed account (z05DSL3A)
I'd also recommend starting out with a Raspberry PI 4. One of the reasons I posted the previous link, another be to show that even pros have a less than smooth journey. Here is the forum https://www.raspberrypi.org/forums/

If you want to go STM32 you could start at www.st.com/stm32stepbystep or www.st.com/stm32education they have training, tell you what boards you will need, etc.

You could also Google STM32 Blue Pill or Black Pill, they should be cheap enough to not worry to much about letting the magic blue smoke out.

I'd also look at getting something like ELEGOO 37-in-1 Sensor Module Kit, a bunch of breakout boards to interface with gives you a range of things to experiment with.

Thank you all very much. And a special thanks to Grey Wolf for both the boards and links: STM32 Blue Pill or Black Pill is probably what I need definitely for the time being.

Yet, I will be very glad to know if there's a popular emulator proper for me and you suggest it. That way I will have a wider spectrum at hands to discover in the world of C++ embedded.
Last edited on
Topic archived. No new replies allowed.