Digital (STM32) Simulation

Hi all I have successfully used KiCad for a mixed signal project and now would like to explore simulation of STM32 MCU’s in the design process pre-fabrication. Proteus would seem ideal (I cannot justify the cost) just wondering the communities views on any FOSS offerings? Just about to embark on re-educating myself on the built-in ngspice offering but cannot find any MCU Spice models (so far!) TIA

What sort of parts do you want to simulate?
Apparently there are quite a bunch of (separate) simulators for ARM cortex M3:

But I have no Idea if these can generate a sort of stimulus file that would be compatible with ngSpice.

Depending on what you want to simulate, there are a bunch of options.
First, maybe one of the simulators from the search above is useful for you (I have not used them myself)

It’s probably easy to generate some simple stimulus from spice primitives that mimic some digital outputs and can be connected to an analog simulation.

I generally debug uC hardware on breadboards. The “Blue Pill” is … kaput. If you buy these now, the chip can be from any of 6 or so different manufacturers, and the chinese tend to erase the chip number and print “STM32” on it. WeAct makes a similar PCB, but with an STM32F411 (Quicker & with hardware floating point), and these (also breadboard compatible) PCB’s are around EUR6 and quite a bargain.

When debugging C (or C++ code) I often compile and run big parts of the code natively on my PC. With a decent IDE you can debug & step through (most of) the code without external hardware.

Code that interacts with the peripherals of the uC I usually debug with Sigrok and a EUR10 Logic Analyzer. I do use ST-Link V2 (clones), but have not yet put much effort on connecting that directly to a debugger.

Thank you for your very comprehensive reply My aim is to rationalize all the design tools as far as possible, that is STM32Cube* for the tool-chain, Kicad for design and pcb production and ngspice for simulation

This is proving not to be possible it seems with all my goal re simulation

I concentrated on STM rather than consider Arm (Kiel) but I will take a further look at the links you supplied

Blue Pill features in my current project and I do agree that Blue Pill STM32F103C8T6 is no more but I have obtained a couple of STM32F103C6T6 marked as ST but have still not proven these. Sigrok plus logic analyser is being sourced at the moment

Would just like to have a FOSS version of Proteus,… but then we cannot have everything now …can we?

Thank you for all your information, it is all relevant and I will explore those link that you suggest

Please also see the discussion on ’ SPICE simulation with microcontrollers’ at


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.