docs(docs): subedit

This commit is contained in:
Hamish Willee
2026-05-20 12:19:15 +10:00
parent 2e745300e1
commit 8c6b81bce5

View File

@@ -6,7 +6,7 @@
- DroneCAN is not enabled by default, and nor are specific sensors and features that use it.
For setup information see [PX4 Configuration](#px4-configuration).
- PX4 requires an SD card to enable dynamic node allocation and for firmware update.
- PX4 requires an SD card to enable dynamic node allocation and for [firmware update](#firmware-update).
The SD card is not used in flight.
:::
@@ -310,34 +310,44 @@ Most DroneCAN nodes require no further setup, unless specifically noted in their
## Firmware Update
PX4 can upgrade device firmware over DroneCAN.
On boot the flight controller scans for firmware binaries, migrates them to the firmware directory, and automatically transfers the firmware to any connected node whose version does not match.
### Placing Firmware Files
::: info
PX4 identifies valid firmware binaries (`.bin`) based on the presence of an **APDescriptor** — a metadata block embedded in the `.bin` file that contains the target board ID, firmware version, and a checksum.
PX4 uses this descriptor to match each binary to the correct node and to determine whether an update is needed.
:::
Place firmware binaries (`.bin` files with a valid APDescriptor) in one of these locations on the SD card before rebooting:
### Firmware Directories
Place firmware binaries in one of these locations on the SD card before rebooting:
- **SD card root** (`/fs/microsd/`): Simplest option for manual updates.
- **Staging directory** (`/fs/microsd/ufw_staging/`): Preferred for remote/programmatic updates. The directory is swapped in atomically at boot, avoiding write conflicts if files are uploaded while the vehicle is running.
- **Staging directory** (`/fs/microsd/ufw_staging/`): Preferred for remote/programmatic updates.
Files are moved to `/fs/microsd/ufw/` at boot before any node is flashed, avoiding write conflicts if firmware is uploaded while the vehicle is running.
On boot, the UAVCAN server scans both locations, reads the board ID from the APDescriptor of each file, and copies it to `/fs/microsd/ufw/<board_id>.bin`. The source file is then deleted. Any connected node whose running version does not match is then flashed over the CAN bus.
On boot, PX4 scans both locations, reads the board ID from the _APDescriptor_ of each file, and copies them to `/fs/microsd/ufw/<board_id>.bin`.
The source file is then deleted.
Any connected node whose running version does not match is then flashed over the CAN bus.
### Firmware Database
A flat-file database at `/fs/microsd/ufw/FW.db` maps each board ID filename to the original filename that was installed. Stale entries are removed automatically on every boot. Example entry:
A flat-file database at `/fs/microsd/ufw/FW.db` maps each board ID to the original firmware filename that was installed.
Stale entries are removed automatically on every boot.
Example entry:
```
```txt
122.bin=122-1.17.63eeff1a.uavcan.bin
```
### Remote Update
Firmware can be delivered remotely by bundling `.bin` files into an update archive. An external update tool can extract the archive on the target and copy the CAN firmware files into `/fs/microsd/ufw_staging/`. They are then picked up on the next boot.
Firmware can be delivered remotely by bundling `.bin` files into an update archive.
An external update tool can extract the archive on the target and copy the CAN firmware files into `/fs/microsd/ufw_staging/`. They are then picked up on the next boot.
Before uploading, the tool can read `/fs/microsd/ufw/FW.db` to check which firmware is already installed and skip files that haven't changed, reducing transfer size.
`upload_skynode.sh` handles the bundling via the `--ext-fw` flag (repeatable for multiple nodes):
```
```sh
./Tools/auterion/upload_skynode.sh \
--ext-fw=build/auterion_canio_default/auterion_canio_default.uavcan.bin
```