CHIBIOS INTEGRATION
Understanding the Real-Time Operating System (RTOS) layer that powers ArduPilot on STM32 microcontrollers. This section explores threading, drivers, and the hardware abstraction layer.
RTOS Integration
ChibiOS & ArduPilot Architecture
Since 2017, ArduPilot has run on top of **ChibiOS/RT**, a high-performance Real-Time Operating System (RTOS). This replaced the older "Flymaple" an...
Threading & Scheduling
While the ArduPilot *Flight Code* (Copter/Plane) is largely single-threaded (the "Main Loop"), the underlying system is highly multi-threaded. `AP_...
HAL & Hardware Drivers
The power of `AP_HAL_ChibiOS` lies in its ability to abstract complex STM32 peripherals into standard interfaces. The most complex and critical par...
Board Configuration (hwdef)
Unlike traditional ChibiOS applications that manually edit `board.h` and `mcuconf.h`, ArduPilot uses a Python-based generator: `chibios_hwdef.py`. ...
Debugging & Fault Analysis
When an STM32 crashes, it triggers a hardware exception (HardFault, MemManage, BusFault). Unlike a desktop OS that segfaults and keeps running, an ...