fix(ci): publish flashable CAN node firmware (#28445)

* fix(ci): publish flashable CAN node firmware

Release packaging only collected .px4 files, which the DroneCAN bootloader cannot flash.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(ci): attach canbootloader .bin as the SWD image

The cannode bootloader is a raw .bin for st-flash, not a .px4 envelope.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(ci): drop cannode.zip from release assets

The target-named .uavcan.bin and _canbootloader.bin files are the flashable images; the zip only duplicated them.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

---------

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
This commit is contained in:
Jacob Dahl
2026-08-28 22:17:34 -06:00
committed by GitHub
parent b5aa22812d
commit 3969a1b8ff
3 changed files with 39 additions and 1 deletions

View File

@@ -27,6 +27,8 @@
# GitHub Releases:
# - All version tags create a draft GitHub Release
# - Pre-releases (alpha/beta/rc suffixes) are automatically marked as such
# - CAN node firmware is attached as <target>.uavcan.bin and
# <target>_canbootloader.bin
#
# IMPORTANT: Version tags do NOT upload to stable/ or beta/. Only the
# corresponding branch pushes control those directories. This prevents
@@ -327,6 +329,8 @@ jobs:
preserve_order: true
files: |
artifacts/*.px4
artifacts/*.uavcan.bin
artifacts/*_canbootloader.bin
artifacts/*.deb
artifacts/**/*.sbom.spdx.json
name: ${{ steps.upload-location.outputs.uploadlocation }}

View File

@@ -1,7 +1,32 @@
#!/usr/bin/env bash
mkdir artifacts
cp **/**/*.px4 artifacts/ 2>/dev/null || true
# CAN node flash images: application APDescriptor (.uavcan.bin) and the
# canbootloader raw .bin (SWD at 0x08000000). The .px4 envelope is not used.
for uavcan_bin in build/*/*.uavcan.bin; do
[ -f "$uavcan_bin" ] || continue
build_dir=$(basename "$(dirname "$uavcan_bin")")
cp "$uavcan_bin" "artifacts/${build_dir}.uavcan.bin"
done
for bl_dir in build/*_canbootloader; do
[ -d "$bl_dir" ] || continue
build_dir=$(basename "$bl_dir")
bl_bin="$bl_dir/${build_dir}.bin"
[ -f "$bl_bin" ] || continue
cp "$bl_bin" "artifacts/${build_dir}.bin"
done
for px4_file in build/*/*.px4; do
[ -f "$px4_file" ] || continue
build_dir=$(basename "$(dirname "$px4_file")")
if [ -f "artifacts/${build_dir}.uavcan.bin" ] || [ -f "artifacts/${build_dir}.bin" ]; then
continue
fi
cp "$px4_file" artifacts/
done
cp **/**/*.elf artifacts/ 2>/dev/null || true
cp **/**/*.deb artifacts/ 2>/dev/null || true
for build_dir_path in build/*/ ; do

View File

@@ -20,6 +20,15 @@ make ark_can-flow_default
This will create an output in **build/ark_can-flow_default** named **XX-X.X.XXXXXXXX.uavcan.bin**. Follow the instructions at [DroneCAN firmware update](index.md#firmware-update) to flash the firmware.
## Pre-built Firmware
PX4 releases attach two images per CAN node:
- `<target>.uavcan.bin` — application, flashed over DroneCAN
- `<target>_canbootloader.bin` — bootloader, SWD-flashed (STM32: `0x08000000`)
The `.px4` envelope is not used on these targets.
## Configuration
### Static Node ID