Running Unmodified PX4 Firmware on Emulated Pixhawk 4 and 6C Boards (Athrill CPU Emulator)

Hello, I’m Takashi, developer of Athrill’s STM32 target and founder of Hakoniwa Lab, a small simulation company in Japan.

I’ve been working on running PX4 firmware directly on an emulated STM32 MCU, without modifying PX4 itself.

Where it stands today:

PX4 v1.17.0 runs on emulated Pixhawk 4 (STM32F765) and Pixhawk 6C (STM32H743) boards, including NuttX, interrupts, DMA, and the actual device drivers.

On the emulator side, I use Zephyr’s STM32 SoC Devicetree files, together with Pixhawk-specific board descriptions, to configure the emulated peripherals.

I’ve also connected the emulator to Hakoniwa Drone, which uses MuJoCo for physics, and confirmed that PX4 can take off and hover with an x500 quadcopter.

One interesting experiment was injecting a motor failure through an emulated DShot ESC. PX4 detected the failure through ESC telemetry, and the simulated aircraft lost control.

What this is not:

It’s not intended to replace real hardware testing or HIL. The MCU timing is simplified, and not every peripheral behavior is fully modeled.

What interests me is whether this approach can help reproduce firmware-level problems that are difficult to observe in SITL, especially those involving device drivers, interrupts, or RTOS behavior.

The code, documentation, and a flight demo are here:

I’m curious whether anyone here has encountered PX4 firmware issues that worked fine in SITL but appeared only on actual hardware.

1 Like