---
title: Athrill STM32 v1.0.0: Fly the Unmodified PX4 Firmware on Your PC (Windows, macOS, Linux)
tags:  #hakoniwa #drone #ros #gazebo #px4  
author: [森崇](https://image.docswell.com/user/kanetugu2015)
site: [Docswell](https://www.docswell.com/)
thumbnail: https://bcdn.docswell.com/page/V7N6WD2478.jpg?width=480
description: Athrill STM32 runs the same PX4 or ArduPilot ELF you flash to a Pixhawk on your PC: no board, no wiring, no rebuild. Version 1.0.0 adds native Windows 11 support (no WSL2), and the same PX4 SIH flight executes exactly 2,904,813,819 instructions with bit-identical results on Windows, macOS and Linux.  This deck covers: - HITL, SITL and PILS: where Athrill fits, and what it adds to SITL - RTOS-level emulation: NuttX, ChibiOS and Zephyr, interrupts, DMA and the real sensor drivers run unchanged - Boards built from Devicetree, with no board code (Pixhawk 4, Pixhawk 6C, Zephyr NUCLEO) - Bit-identical reproducibility across hosts - DShot600 ESC emulation, KISS telemetry and motor-failure injection - JIT and tick skip: about 1.8x faster, same output bits - The same ArduPilot ELF on Athrill and Renode (about 3.8x), and why a device access is cheap on Athrill - Choose your physics: Hakoniwa Drone (MuJoCo) or Gazebo  Athrill3 is open source (MIT). If you like it, please Star and Watch on GitHub: https://github.com/hakoniwalab/athrill-target-stm32  Release article (Japanese): https://hakoniwa-lab.net/2026/12/03/athrill-stm32-v1/  Hakoniwa Lab
published: December 04, 26
canonical: https://image.docswell.com/s/kanetugu2015/KGN3W4-2026-12-04-105011
---
# Page. 1

![Page Image](https://bcdn.docswell.com/page/V7N6WD2478.jpg)

RELEASE
·
2026-12-03
Athrill STM32 v1.0.0
Fly the unmodified PX4 firmware on your PC,
now natively on Windows, macOS and Linux
Windows 11 x64
macOS (Apple silicon)
Hakoniwa Lab · PX4 Meetup Japan · 2026-12-11
Linux x86_64 (Ubuntu 24.04, WSL2)


# Page. 2

![Page Image](https://bcdn.docswell.com/page/YJ9LXG14E3.jpg)

An emulated Pixhawk 4 in flight
QGroundControl and the PX4 console
Athrill3 on your PC
Unmodified PX4 v1.17.0 ELF
Flight stack, NuttX and sensor drivers
Driver reads and writes to device registers
Emulated Pixhawk 4
STM32F765, NVIC, DMA, SPI and timers
PX4 SIH flight on the emulated board
2


# Page. 3

![Page Image](https://bcdn.docswell.com/page/GJ8X2V4V7D.jpg)

v1.0.0 in four numbers
2,904,813,819
instructions, the same on
Windows, macOS and
Linux
0
×1.8
×3.8
hardware to prepare: no
board, wiring or flashing
faster with JIT and tick
skip, with bit-identical
output
the speed of Renode,
running the same
ArduPilot ELF
PX4 v1.17.0 and ArduCopter V4.7.2 official binaries · Pixhawk 4, Pixhawk 6C, Zephyr NUCLEO · open source (MIT)
3


# Page. 4

![Page Image](https://bcdn.docswell.com/page/LJL8256RER.jpg)

As easy to start as SITL, running the real firmware
Prepare a board
Rebuild for the PC
Download and run
• Board and wiring
• Starts on a PC alone
• Starts on a PC alone
• Flash the firmware
• Needs a PC build of the firmware
• Runs the real firmware
• RTOS, interrupts, DMA and
drivers differ from the board
• No rebuild: the published ELF as
is
• More vehicles, more hardware
• Scales to many vehicles
• RTOS, interrupts, DMA and
drivers run the board&#039;s code
• Scales, and repeats bit for bit
Athrill complements SITL and HITL: it puts the shipping binary on the PC.
4


# Page. 5

![Page Image](https://bcdn.docswell.com/page/47M6835PJW.jpg)

RTOS, interrupts, DMA and drivers run unchanged
What runs
SITL
Athrill (PILS)
Binary
Rebuilt for the PC
The ELF you flash
RTOS scheduling
Host OS threads
NuttX, ChibiOS, Zephyr as on the board
Interrupts, DMA
None
From NVIC, DMA and timer models
Sensor drivers
Simulation drivers
The real drivers read the chips&#039; registers
Time
Lockstep with the simulator
Virtual clock, 1 instruction = 1 clock; same interrupt order
every run
Fidelity: register-level functional models at RTOS granularity, not cycles or electrical behaviour. The CPU is Cortex-M7 (Armv7-M, Thumb-2, DSP,
FPv5-D16), decoded from Arm&#039;s machine-readable architecture data. It does not replace hardware, safety or flight tests.
5


# Page. 6

![Page Image](https://bcdn.docswell.com/page/P7RP5Q3YJ9.jpg)

Native Windows: download, unpack, fly
• Windows 11 x64, no WSL2
• athrill3.exe links the C runtime and libyaml statically:
it needs only WS2_32 and KERNEL32
• Git Bash and Python 3 run the README&#039;s Try it:
download, checksum, unpack, boot PX4
• QGroundControl connects to TCP 127.0.0.1:5760
• Build guides for macOS, Linux and Windows through
the Hakoniwa Business Pack
Try it (Git Bash)
git clone --branch v1.0.0 \
https://github.com/hakoniwalab/athrill-target-stm32.git
. athrill-target-stm32/tools/versions.sh
curl -LO &quot;$ATHRILL_RELEASE_URL/$ATHRILL3_DIR.tar.gz&quot;
curl -LO &quot;$ATHRILL_RELEASE_URL/px4_fmu-v5_default.elf&quot;
curl -L -o SHA256SUMS &quot;$ATHRILL_RELEASE_URL/SHA256SUMS&quot;
athrill_sha256 -c --ignore-missing SHA256SUMS
tar xzf &quot;$ATHRILL3_DIR.tar.gz&quot;
git clone https://github.com/hakoniwalab/athrill-device.git
git -C athrill-device checkout -q &quot;$ATHRILL_DEVICE_COMMIT&quot;
athrill-target-stm32/examples/px4-sih/run.sh \
px4_fmu-v5_default.elf &quot;$ATHRILL3&quot;
6


# Page. 7

![Page Image](https://bcdn.docswell.com/page/PJX3K5447X.jpg)

Boards: Pixhawk 4, Pixhawk 6C and Zephyr NUCLEO
STM32F765 · Cortex-M7 · 216 MHz
STM32H743 · Cortex-M7 · 480 MHz
NUCLEO-F767ZI / H743ZI
Pixhawk 4
Pixhawk 6C
NUCLEO
• PX4 v1.17.0 (fmu-v5)
• PX4 v1.17.0 (fmu-v6c)
• Zephyr samples
• ArduCopter V4.7.2 (official
binary)
• ArduCopter V4.7.2
• hello_world, synchronization,
philosophers
• Flies with SIH, Hakoniwa and
Gazebo
• Flies with DShot
• Flies the Hakoniwa x500
• Board from Zephyr&#039;s own board
file
• DShot ESC and motor failure
Emulated sensor chips: ICM-20689, ICM-42688-P, BMI055, MS5611, IST8310, u-blox M8 and more. The firmware&#039;s own drivers read their
registers.
Board photos: PX4 User Guide (CC BY 4.0) and Zephyr Project documentation
7


# Page. 8

![Page Image](https://bcdn.docswell.com/page/3JKY56ZP7D.jpg)

No board code: one Devicetree builds the board
Models that Athrill3 assembles
SoC (from Zephyr)
stm32f765Xi.dtsi, unchanged
USART · UART
DTB
Devicetree blob
Board
pixhawk4.dts: sensors, wiring
SPI · I2C
Firmware
the ELF you flash
DMA · DMAMUX
Timer · PWM
NVIC · EXTI
SDMMC · F-RAM
PX4 · ArduPilot ·
Zephyr
IMU · baro · mag · GPS chips
DShot ESC (timer DMA burst)
An enabled node without a model stops the boot and
names its path.
Peripheral models instantiated from the DTB
NUCLEO boards include Zephyr&#039;s whole nucleo_f767zi.dts: the board a Zephyr application was built for and the board Athrill emulates come from one
description.
8


# Page. 9

![Page Image](https://bcdn.docswell.com/page/LE39K6D4E5.jpg)

Bit-identical on Windows, macOS and Linux
PX4 SIH take-off, hover and landing on each host: different OSes and CPU architectures (Apple silicon and x86_64), the same
four results bit for bit.
=
Instructions
=
F-RAM
2,904,813,819
the parameter store
=
=
SD card image
the whole image, ULog included
Console
normalized: PX4&#039;s NSH output without Athrill&#039;s own
start-up lines
9


# Page. 10

![Page Image](https://bcdn.docswell.com/page/8EDG3VP5EG.jpg)

DShot600 ESCs, telemetry and motor failure
PX4 / ArduPilot
Timer DMA burst
Emulated ESC
Motor
DShot driver packs bits into a
DMA buffer
writes TIM1 compare
registers
checks bit rate, duty, CRC,
frame gap
drops bad frames like a real
ESC
Telemetry
Motor failure
KISS telemetry on UART4: temperature, voltage, current,
consumption, eRPM.
The fault model stops a motor at a chosen time. When a
spinning motor&#039;s current does not match its throttle for 100 ms,
PX4 v1.17 reports &quot;Motor failure detected&quot; by itself.
Video (about 5 min): youtube.com/watch?v=XWAsmVYS8bM
10


# Page. 11

![Page Image](https://bcdn.docswell.com/page/V7P34VNDJ8.jpg)

JIT and tick skip: about 1.8× faster, same bits
JIT
Each basic block is translated once with sljit and
chained. Untranslated instructions, device accesses
and exceptions take the interpreter&#039;s code.
Real-time factor (higher is faster)
4
3.32
3.5
3.52
3
2.5
2
2.30
1.96
1.95
1.5
1.28
Tick skip
A device model that does not change in a tick skips
it: a timer before its next event, an idle UART or
GPIO.
Console, F-RAM, SD image, MAVLink bytes and
instruction count are the same in all three modes.
1
0.5
0
PX4 v1.17.0 SIH (74.1 virtual s)
Interpreter
ArduCopter V4.7.2 (80 virtual s)
JIT
JIT + tick skip
11


# Page. 12

![Page Image](https://bcdn.docswell.com/page/2JV4XZKG7Q.jpg)

Tick skip: tick only the models that can change
Without tick skip: every model, every clock
Who decides
Each model tells Athrill:
• Timer: tick me at my next deadline
• UART: skip me while idle
• GPIO: I never change by myself
CPU
Timer
A register access always asks for a tick.
UART
GPIO
RTF, JIT → JIT + tick skip
PX4 SIH 3.32 → 3.52
ArduCopter 1.95 → 2.30
With tick skip: only when it can change
CPU
Same instructions, same bits
Timer
UART
And when the firmware idles (WFI or b .), the
clock jumps straight to the next device event.
GPIO
firmware write
sending a frame
compare match
virtual clock: 1 instruction = 1 clock
CPU executes
model ticked
model ticked (needed)
tick skipped
12


# Page. 13

![Page Image](https://bcdn.docswell.com/page/5EG1V49DJL.jpg)

Same ArduPilot ELF: Athrill and Renode
One Apple M2 Pro, the same ELF, one IMU on both (Renode --num-imus 1), both halting in the idle loop, virtual 20 s to 80 s.
Real-time factor
1.68 → 0.44 s
host time per virtual second (Renode → Athrill)
Renode (ArduPilot perf branch)
Athrill, interpreter
Athrill, JIT + tick skip
0.60
0.74 → 0.11 s
1.24
of which, in the device models
2.27
411,627 / 411,873
instructions from reset with the same PC trace
13


# Page. 14

![Page Image](https://bcdn.docswell.com/page/4JQD6GWX7P.jpg)

Where the host time goes
Host seconds per virtual second (shorter is faster)
0
0.2
Renode
Athrill, interpreter
0.4
0.6
0.74
0.18
0.8
1
1.2
0.94
0.63
1.4
1.6
1.8
Athrill makes 1.3× as many register accesses
1.01 M against 0.76 M per virtual second, yet it
spends less than a quarter of Renode&#039;s time in
its device models.
Renode&#039;s emulation thread
44% device models in .NET, 15% setjmp around
calls into the CPU library (macOS), 14% guest
code, 5% time framework.
Not the idle loop: both halt at it (Renode&#039;s tlib
also treats Thumb b . as WFI).
Athrill, JIT + tick skip
0.11
0.33
Device models
CPU and everything else
14


# Page. 15

![Page Image](https://bcdn.docswell.com/page/K74Z45K2E1.jpg)

Why: two designs, two trade-offs
Renode: composed
Athrill: monolithic
• Device models in C#, CPU in a C library
• CPU and devices all in C, one thread
• Each register access crosses the language boundary
• An access is one function call
• Time handed between threads quantum by quantum
• One integer clock, 1 instruction = 1 clock: nothing to
synchronise
1
Device-heavy firmware: ArduCopter: the language boundary dominates (device models 44%, setjmp 15% of Renode&#039;s thread).
2
Mostly-asleep firmware: Zephyr philosophers: 69% of Renode&#039;s CPU thread is time synchronisation. About 35 M instructions
each: RTF ~10 on Renode, ~430 on Athrill (console transmit time skipped).
3
On top of that: JIT and tick skip cut Athrill&#039;s own CPU time from 0.81 s to 0.44 s per virtual second.
15


# Page. 16

![Page Image](https://bcdn.docswell.com/page/LJ1R4WXKJG.jpg)

Why a device access is cheap on Athrill
Renode
Firmware
CPU
Peripheral model
Back to the CPU
LDR / STR to a peripheral
tlib, C
C#, .NET
call guarded by setjmp
C → C# boundary
≈ 1.0 µs
per access
C# → C, setjmp
Athrill
Firmware
CPU
Model function
LDR / STR to a peripheral
C
C, same thread
Next instruction
≈ 0.1 µs
per access
one function call
Time in the device models ÷ register accesses, per virtual second of the same ArduCopter run: Renode 0.74 s ÷ 0.76 M, Athrill (JIT + tick skip) 0.11 s ÷ 1.01 M. Athrill makes 1.3× as
many accesses; the figure includes the models&#039; own work.
16


# Page. 17

![Page Image](https://bcdn.docswell.com/page/GJW1X6NPE2.jpg)

Choose your physics engine
Motor commands
Emulated Pixhawk
X500 vehicle model
PX4 ELF and its sensor drivers
MuJoCo or Gazebo
IMU, barometer, magnetometer and GPS readings
MuJoCo
gz-sim
Hakoniwa Drone
Gazebo
• x500 in MuJoCo, as a Hakoniwa asset linked to other
simulations and viewers
• PX4&#039;s Gazebo x500 as is
• Or the vehicle inside the Athrill process, for regression
tests and tuning
• DShot ESC telemetry and motor failure
• Take-off and move flown on native Windows
or
• gz-sim runs inside the Athrill process, on Athrill&#039;s
virtual time
• No gz-transport or ROS in the control path
• Flown on macOS and WSL2; native Windows not yet
tried
17


# Page. 18

![Page Image](https://bcdn.docswell.com/page/4EZP6Y36J3.jpg)

Before you flash it
Run the firmware you will flash on your PC first, and check not only the control
algorithm but the RTOS, interrupts, DMA and sensor drivers. We want to make
that kind of development everyday. Athrill3 is open source: please try it.
Scan for GitHub
If you like it, please ★ Star and Watch on GitHub
github.com/hakoniwalab/athrill-target-stm32
Hakoniwa Lab · hakoniwa-lab.net


