flysky-i6x-rs BARE-METAL RUST

A clean-slate Rust OS for the FlySky FS-i6X.

Built from real-world OpenI6X contribution experience and verified on physical hardware. Squeezes an entire radio OS written in bare-metal #![no_std] Rust—260 Hz AFHDS 2A RF link, native 100 Hz USB simulator joystick, Catmull-Rom spline curves, and 14-channel matrix mixing—into 70 KB, leaving over 45% of Flash completely free.

260 Hz
AFHDS 2A Sync Frame
>45% Free
Flash Headroom (>57 KB)
<30 µs
Flight Pipeline Execution
FlySky FS-i6X Status
A7105 SPI // TIM16
FS-i6X TX wingfc-rs [Coming Soon]
Frames TX
14,280
RF Sync Window
3.8 ms
Air RSSI
-68 dBm
DMA1 11-Channel Scan: Cycle: 0.23 ms // CPU: 0%
Origin & Motivation

Breaking past the 128 KB ceiling.

“Squeezing OpenTX into 128 KB was an incredible technical feat by the OpenI6X team. But as a contributor, adding any new feature had become a zero-sum game: you had to remove something without breaking the build just to avoid overflowing Flash or RAM.”

The FlySky FS-i6X is the world's most ubiquitous ~$40 RC transmitter, powered by an STM32F072VB (ARM Cortex-M0 @ 48 MHz) with 128 KB Flash and 16 KB SRAM. Legacy C++ ports push this chip to ~94% capacity, leaving less than 7 KB to spare.

Rather than endlessly pruning bytes, we started clean: a dedicated, lightweight firmware written strictly in bare-metal #![no_std] Rust under the ferrox-rc organization. The entire radio OS fits in just 70.4 KB of Flash, leaving over 57 KB (>45%) of free headroom for community mods, telemetry scripts, and new features.

Velocity & Craft // A Note on Expedience

Starting clean in embedded systems is often dismissed as impractical—rewriting an established radio OS from bare silicon traditionally demands months of solitary reverse engineering and tedious peripheral scaffolding.

Here, unprecedented expedience was unlocked through a disciplined human-AI pair-programming methodology. Deep domain expertise—silicon pinouts, DMA priorities, A7105 transceiver errata, and microsecond-precise AFHDS 2A protocol timings—provided the architectural blueprint and physical ground truth, while modern AI acted as a relentless copilot for boilerplate HAL mappings, USB descriptors, and math routines. Every subsystem was guided by human intent, verified line-by-line, and validated on physical bench hardware. The result is a production-grade bare-metal OS brought to life in days rather than seasons.

FlySky FS-i6X Subsystems

Built From the Ground Up

Every peripheral and timing requirement implemented natively in bare-metal Rust.

Memory Architecture

Massive Flash Headroom

>45% Free

By ditching dynamic allocation and monolithic RTOS overhead, the firmware consumes only 70.4 KB of Flash and 1.7 KB static RAM + 1 KB LCD framebuffer.

Hardware Allocation (128 KB Flash · 16 KB SRAM) 57.6 KB FLASH FREE
flysky-i6x-rs Flash: 70.4 KB 57.6 KB free (45%)
SRAM: 1.7 KB static + 1 KB LCD buf (2.7 KB) >83% SRAM free (13.3 KB avail)
OpenI6X / OpenTX Flash: ~121 KB <7 KB free (<6%)
SRAM: ~13.6 KB used <2.4 KB free (<15%)
Compiled with opt-level = "z", lto = "fat", codegen-units = 1, and panic = "abort".
Mathematical Precision

Catmull-Rom Spline Curves

No-FPU

Traditional radios use harsh piecewise linear points. We evaluate continuous Catmull-Rom cubic Hermite splines entirely in 32-bit integer arithmetic without software division bloat.

Interactive Spline Preview: Drag points
Flashing & Simulator

Zero Risk. Identical OpenI6X DFU Workflow.

Uses the STM32F072's permanent factory ROM bootloader. Flash via USB in 10 seconds and revert back anytime.

Unbrickable DFU Process

The Same Steps You Already Know

1. Hold Roll Left + Yaw Right trims inward while powering on the FS-i6X to enter factory DFU mode.
2. Connect standard micro-USB data cable to your PC.
3. Run the one-line dfu-util command below:

CLI (dfu-util)
dfu-util -a 0 -s 0x08000000:leave -D flysky_i6x.bin
RUST DEVELOPERS (probe-rs)
cargo flash --chip STM32F072CB --release
✓ 100% reversible: restore OpenI6X or stock backup anytime with the exact same command.
PC Flight Simulator Mode

Plug & Play USB HID Gamepad

Plug the FS-i6X directly into Windows, macOS, or Linux. It instantly enumerates as an 8-axis, 16-button Full-Speed USB Gamepad—no serial dongles or CP2102 adapters required.

  • Silent RF Standby: Automatically puts the A7105 radio module to sleep to stay cool and preserve battery.
  • Simulator Ready: Instant plug-and-play in Liftoff, Velocidrone, Uncrashed, FPV Freerider, RealFlight, and MSFS.
  • CDC-ACM Serial CLI: Secondary USB interface outputs live JSON Lines telemetry and accepts runtime commands.
USB HID Gamepad: READY (100 Hz refresh // 8 Axes, 16 Buttons)
Development Methodology

Domain expertise meets bench testing.

Human Domain Lead

Pinouts, register maps, DMA priorities, A7105 FIFO quirks (forcing STANDBY before FIFO load), and protocol timings derived from real OpenI6X reverse engineering.

Rapid Scaffolding

Modern AI pair-programming applied to generate tedious no_std HAL glue code, USB descriptors, 6800-series parallel writes, and math routines in hours instead of months.

Physical Bench Truth

Not a theoretical repo: every subsystem has been flashed and validated on physical STM32F072 hardware with real gimbals, real receivers (FS-iA6B/Fli14), and real USB hosts.

We believe in radical transparency: by combining deep hardware experience with modern AI pair-programming, we built a production-grade, bare-metal OS on silicon that is open, reproducible, and ready for community expansion.

Hardware Specifications

The Details Matter

Engineered down to the register level for hard real-time avionics reliability.

Primary Microcontroller
STMicroelectronics STM32F072CB
ARM Cortex-M0 @ 48 MHz (128 KB Flash / 16 KB SRAM)
Memory Footprint
70.4 KB Flash Used (45.0% Headroom)
1.7 KB Static RAM + 1 KB LCD buf (>89% SRAM free)
Control & RF Loop Timing
259.74 Hz RF Sync (3.850 ms Frame Sync)
TIM16 & EXTI2 interrupts; sub-30 µs flight pipeline execution
ADC Stick & Switch Scanning
0.23 ms Autonomous 11-Channel Scan
Continuous circular DMA1 Channel 1 with zero CPU load
RF Protocol & Telemetry
AFHDS 2A via Amiccom A7105 SPI
Bidirectional binding, i-BUS telemetry downlink (RSSI, RX voltage)
Throttle Curve Math
Catmull-Rom Cubic Hermite Splines
Computed entirely in 32-bit integer arithmetic without FPU overhead
Display & UI Concurrency
Decoupled 30 Hz Display Throttling
ST7567 128×64 6800-bus parallel LCD flush in <1.2 ms; never delays flight loop
Recovery & Bootloader
Permanent ROM DFU (Un-brickable)
Identical to OpenI6X: Roll Left + Yaw Right trims inward on power-on
The Airborne Companion // Coming Soon

From Ground Station to Airborne Wing

The next step in the Ferrox-RC ecosystem: bringing high-rate bare-metal Rust directly into autonomous flight control.

In Active Bench Development

wingfc-rs

Watch on GitHub ↗

Tailored for sub-250g FPV flying wings and micro autonomous UAVs based on the Seeed XIAO nRF52840 (Cortex-M4F @ 64 MHz with FPU). Built completely upon the cooperative Embassy async runtime for non-blocking sensor acquisition and deterministic lockstep flight control.

416 Hz / 833 Hz Loop
Hardware DRDY interrupt-paced control loop with dynamic dt.
FPU Madgwick AHRS
Single-cycle hardware floating-point quaternion fusion.
i-BUS & CRSF Downlink
Continuous telemetry stream directly to your FS-i6X ground station.