Skip to main content
Explorer
Jan 11, 2026 12:22 AM UTC
Question

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

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

4 replies

Pavel A.
Jan 11, 2026 12:49 AM UTC

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

 

Associate II
Jan 11, 2026 1:03 AM UTC
Andrew Neil
Super User
Jan 12, 2026 3:30 PM UTC

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
Jan 13, 2026 10:59 AM UTC

@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.