Hello all,
I'm an experienced C++ programmer but very beginner to the world of embedded. My intention is to use modern C++ for embedded programming especially on ARM MCU. As my first hands-on experiment, I need to start with a Blue Pill and make its LED blink. Sadly, due to the hard situation in the place I live in, finding even such an simple board can be difficult. I'm not sure this is the right place on the site to ask my questions in this regard or not, but I hope so. I've got two questions:1) Is there any popular emulator that can properly emulate an MCU like Blue Pill, Black Pill or lower/higher models so that I can run my C++ program and observe the results on it? For instance, to see an LED blinking? If so, what's that good emulator, please? I've got two machines to install that emulator software on: Windows, and Linux.
2) What're the advantages and disadvantages of using such an emulator versus having real boards for that purpose, please?
Thanks beforehand.
Andy Neil said:Proteus ... But that's an order of magnitude more expensive than a Nucleo (or similar)
Proteus ... But that's an order of magnitude more expensive than a Nucleo (or similar)
Ronan Synnott said:Fixed Virtual Platforms (FVPs) in Development Studio and Keil MDK packages
and that seems to be another order of magnitude (or more) over Proteus?!
Hi AryThough not specifically modeling BluePill or similar, Arm provide Fixed Virtual Platforms (FVPs) in Development Studio and Keil MDK packages. These are system models and include things suck as simulated LEDs. These are also the reference platform for a number of the supplied examples (including a blinky LED blinker application!).https://developer.arm.com/documentation/100966/1113/MPS2-Platform-FVPsIf you need more info, feel free to send me a direct message (I am an employee at Arm)
Thank you very much for your profound reply. So I'd better bow out of emulators and stick with real hardware for the reasons you mentioned.
What Nucleo board do you suggest that I choose, please? I need some model that's not expensive, and is suitable for me as a beginner and on the other hand I can rely on that for many projects from beginners to a little higher level.
Is STM32F411 (Black Pill) that different from that Nucleo board, please?For the Pills I can make profit from their step-by-step tuts which look very useful: https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-step-by-step.htmlIf Nucleo board is very different from a Black Pill and you still recommend that it be what I should go for, does it have tuts like the above address to guide me step-by-step, please?
QEMU ?
https://www.qemu.org/
https://wiki.qemu.org/Documentation/Platforms/ARM
https://www.youtube.com/watch?v=Zvbarf1CSGs
Ary said:What're the advantages and disadvantages of using such an emulator versus having real boards for that purpose, please?
Well, the whole point of embedded microcontrollers is precisely to do real hardware control - so you are missing that entirely!
AFAIK, Something like QEMU is just an instruction set emulator - it doesn't cover the external hardware.
As you're already an experienced C++ programmer, you know about the "software" side - so I wouldn't have thought that an emulator adds anything for you?
For STM32, rather than a Blue Pill, I would strongly recommend that you get a Nucleo board - which comes complete with a built-in debug probe - they are low-cost and widely available:
www.st.com/.../stm32-nucleo-boards.html
That way you can run on real hardware and have full debug access & visibility to the "internals" of the chip.
For full hardware simulation, there's things like Proteus:
https://www.labcenter.com/simulation/
But that's an order of magnitude more expensive than a Nucleo (or similar) - and you'll have a learning curve just for that tool.