Skip to main content
Explorer
January 11, 2026
Question

Is it possible to debug STM32 code without any hardware (no board, no ST-Link, no QEMU)?

  • January 11, 2026
  • 3 replies
  • 640 views

Hello everyone,

I’m working with STM32CubeIDE (v1.19) and STM32 projects, but currently I don’t have any STM32 board or debug probe available.

What I want to achieve is not real hardware simulation, but something like:

  • Step-by-step execution

  • Breakpoints

  • Variable watching

  • Logical flow debugging

Constraints:

  • :cross_mark: No STM32 board

  • :cross_mark: No ST-Link / J-Link

  • :cross_mark: No QEMU / Renode / Proteus

  • :white_heavy_check_mark: Only PC-based development

3 replies

Pavel A.
Super User
January 11, 2026

So why not QEMU? It is pure software and free. ARM (Keil) provides a software simulator that works with their IDE & debugger.

 

Associate II
January 11, 2026
Andrew Neil
Super User
January 12, 2026

So long as your code doesn't rely on any STM32 hardware interaction, you could build and run it in a PC native environment.

You can "stub" parts that would rely on STM32 hardware.

This is also a great way to test your embedded code!

(I am currently doing this to test/debug some STM32 accelerometer handling)

 

As @Pavel A. said, Why do you preclude QEMU? It is not a hardware simulator.

 

Anyhow, something like a Nucleo board is cheap - why not just get one?

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
January 13, 2026

@Andrew Neil wrote:

You can "stub" parts that would rely on STM32 hardware.


If you use HAL for all your hardware interactions, you could just "stub" the HAL functions...

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.