Files
PX4-Autopilot/docs/en/hardware/porting_guide_nuttx.md
T
Hamish Willee 860aca9864 docs(docs): fix broken links and missing uORB TOC entries (#28827)
* docs(msg): add missing uORB message pages to SUMMARY

The msg_docs block in SUMMARY.md is not regenerated by the metadata sync,
so seven message pages were unreachable from the sidebar (PageNotInTOC).
Replace the block with the fragment written by generate_msg_docs.py,
which also moves VehicleControlMode to the unversioned list.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>

* docs: fix broken and permanently redirected external links

CUAV moved its docs to a /en/<product>/ layout, so the Nora, C-RTK 9Ps
and C-RTK2 links returned 404. Other vendor links (InvenSense, Bosch,
ARK, CORVON) permanently redirect; point them at the final URL.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>

* docs: fix remaining dead external links

RaccoonLab's store product pages, the CubeNode pin descriptions,
wiki.ubuntu.com/LTS and the Bitbucket NuttX repos no longer resolve.
RaccoonLab now only has docs pages for these devices, so link those.

ubuntu.sh and macos.sh already install kconfig-frontends, so the NuttX
porting guide no longer tells Ubuntu users to build it from source; the
old steps are kept in a comment.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>

* docs: ignore unresolvable external links for 6 months

These links fail the external link check for reasons a docs edit can't
fix: bot blocking (raccoonlab.co, gitlab.arm.com), expired vendor
certificates (svehicle.cn, jmarple.ai), and the ARKV6X-RT order link,
which is waiting on a replacement URL from ARK.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>

---------

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
2026-09-24 09:55:45 +10:00

5.8 KiB

NuttX Board Porting Guide

In order to port PX4 on NuttX to a new hardware target, that hardware target must be supported by NuttX. The NuttX project maintains an excellent porting guide for porting NuttX to a new computing platform.

The following guide assumes you are using an already supported hardware target or have ported NuttX (including the PX4 base layer) already.

The configuration files for all boards, including linker scripts and other required settings, are located under /boards in a vendor- and board-specific directory (i.e. boards/VENDOR/MODEL/).

The following example uses FMUv5 as it is a recent reference configuration for NuttX based flight controllers:

NuttX Menuconfig Setup

To modify the NuttX OS configuration, you can use menuconfig using the PX4 shortcuts:

make px4_fmu-v5_default menuconfig
make px4_fmu-v5_default qconfig

The kconfig tools used by these targets (kconfig-mconf and kconfig-qconf) are installed by the standard Ubuntu and macOS development environment setup, and are included in the px4-dev-nuttx docker container.

To run qconfig you may need to install additional Qt dependencies.

Bootloader

First you will need a bootloader, which depends on the hardware target:

Firmware Porting Steps

  1. Make sure you have a working development setup and installed the NuttX `menuconfig`` tool (see above).

  2. Download the source code and make sure you can build an existing target:

    git clone --recursive https://github.com/PX4/PX4-Autopilot.git
    cd PX4-Autopilot
    make px4_fmu-v5
    
  3. Find an existing target that uses the same (or a closely related) CPU type and copy it. For example for STM32F7:

    mkdir boards/manufacturer
    cp -r boards/px4/fmu-v5 boards/manufacturer/my-target-v1
    

    Change manufacturer to the manufacturer name and my-target-v1 to your board name.

Next you need to go through all files under boards/manufacturer/my-target-v1 and update them according to your board.

  1. firmware.prototype: update the board ID and name
  2. default.px4board: update the VENDOR and MODEL to match the directory names (my-target-v1). Configure the serial ports.
  3. Configure NuttX (defconfig) via make manufacturer_my-target-v1 menuconfig: Adjust the CPU and chip, configure the peripherals (UART's, SPI, I2C, ADC).
  4. nuttx-config/include/board.h: Configure the NuttX pins. For all peripherals with multiple pin options, NuttX needs to know the pin. They are defined in the chip-specific pinmap header file, for example stm32f74xx75xx_pinmap.h.
  5. src: go through all files under src and update them as needed, in particular board_config.h.
  6. init/rc.board_sensors: start the sensors that are attached to the board.