Skip to main content
Associate
Nov 17, 2026 11:47 AM UTC
Question

How desirable is a fully simulated development environment for the STM32 and other MCUs?

Hi all,

I’m developing a simulation environment that connects real STM32 firmware to simulated electronics and robot mechanics, and I’d like to hear whether this would be useful in your development workflow.

The idea is to load a compiled firmware ELF (from stm32cubeide) into an emulated STM32 and simulate real world robot behaviour.

Firmware sets PWM → a motor driver powers a motor → the motor moves a robot → encoders and other sensors feed signals back into the firmware. This flow is viewable in an optional 3D-rendering of the robot (gazebo-style).

Motor loads, inertia, and sensor behaviour would affect the system, allowing the firmware to respond as it would on a physical machine.

I’d like to bring firmware debugging, peripheral signals, and a 3D representation of the machine into one simulation environment.

Would you use something like this?

10 replies

Andrew Neil
Super User
Nov 17, 2026 12:01 PM UTC

The idea is to load a compiled firmware ELF (from stm32cubeide) into an emulated STM32

That would be phenomenally expensive.

I suggest a better approach would be to use a Nucleo board to host the executable.

You have pretty much full access to the STM32 via the debug interface, and feed your simulated signals into that.

 

Google* “Hardware In the Loop” (aka “HIL”) - it’s a pretty qwell-established field …

 

* other internet search engines are available.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Super User
Nov 17, 2026 12:11 PM UTC

It is a question which comes up periodically; eg,

 

etc, etc, ...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
DryRoad64Author
Associate
Nov 17, 2026 12:19 PM UTC

Thanks for these, I’ll have a read.
I do still wonder what the commercial viability of such a software is - I just figured I’d ask here how desirable it would be.
Cheers

Andrew Neil
Super User
Nov 17, 2026 12:42 PM UTC
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
mƎALLEm
ST Technical Moderator
Nov 17, 2026 1:39 PM UTC

Hello ​@DryRoad64 and welcome to the ST community,

Thank you for the initiative. My questions are: how this simulator would be faithful to a real hardware? what about timings,  would it take into account all the product architecture aspects? do you think you can simulate complex products like STM32H7 dual core or  STM32N6 for example? does it take into account all the available erratas? think about a user simulates something on your simulator and when he passes to a real hardware, he finds another behavior.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
DryRoad64Author
Associate
Nov 18, 2026 12:43 AM UTC

These are important questions which will determine the applicability of the simulation suite.

Currently my scope is checking functional behaviour and control-loop testing in a desired simulation environment - e.g. for an autonomous traversing robot; state estimator, control logic, state machine, motor control etc. mapped through the inputted embedded code.

Hardware timing and priorities can be simulated, but this would never eliminate real-world hardware validation - where as I'm sure you know, things don't work for no reason!

This is very much a work in progress, but I believe there's a real need for a centralized software capable of this.

Andrew Neil
Super User
Nov 18, 2026 9:31 AM UTC

Hardware timing and priorities can be simulated, 

But, to simulate them, you’d need full specifications of all the details of the internal STM32 hardware.

ST (nor other microcontroller makers) don’t publish that.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.