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
Board Configuration (hwdef)
Unlike traditional ChibiOS applications that manually edit `board.h` and `mcuconf.h`, ArduPilot uses a Python-based generator: `chibios_hwdef.py`. ...
ChibiOS & ArduPilot Architecture
<!-- VISUAL_ASSET: chibios_architecture_layers -->
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 ...
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...
Threading & Scheduling
While the ArduPilot *Flight Code* (Copter/Plane) is largely single-threaded (the "Main Loop"), the underlying system is highly multi-threaded. `AP_...