Porting Guide
PX4 consists of two main layers: The board support and middleware layer on top of the host OS (NuttX, Linux or any other POSIX platform like Mac OS). And the applications (in src/modules).
This guide is focused only on the middleware as the applications will run on any board target.
NuttX Boards
The main files for a NuttX board are located at (for the FMUv5 example):
- src/drivers/boards/px4fmu-v5 - board startup and PX4 board configuration
- nuttx-configs/px4fmu-v5/include/board.h - NuttX board config
- nuttx-configs/px4fmu-v5/nsh/defconfig - NuttX OS config - created with menuconfig
- nuttx-configs/px4fmu-v5 - Linker scripts and other required settings
- ROMFS/px4fmu_common - the boot file system
- cmake/configs/nuttx_px4fmu-v5_default.cmake - board build configuration
Linux Boards
Linux boards do not include the OS and kernel configuration. These are already provided by the Linux image available for the board (which needs to support the inertial sensors out of the box).
- cmake/configs/posix_rpi_cross.cmake - RPI cross-compilation