This page has moved to https://docs.px4.io/master/en/uavcan/node_firmware.html.
Click here if you are not redirected.
Download the ESC code:
git clone https://github.com/thiemar/vectorcontrol cd vectorcontrol
Before updating firmware via UAVCAN, the Pixhawk ESC 1.6 requires the UAVCAN bootloader be flashed. To build the bootloader, run:
make clean && BOARD=px4esc_1_6 make -j8
After building, the bootloader image is located at
firmware/px4esc_1_6-bootloader.bin, and the OpenOCD configuration is located at
openocd_px4esc_1_6.cfg. Follow these instructions to install the bootloader on the ESC.
BOARD=s2740vc_1_0 make && BOARD=px4esc_1_6 make
This will build the UAVCAN node firmware for both supported ESCs. The firmware images will be located at
com.thiemar.s2740vc-v1-1.0-1.0.<git hash>.bin and
Download the Sapog codebase:
git clone https://github.com/PX4/sapog cd sapog git submodule update --init --recursive
Before updating firmware via UAVCAN, the ESC requires the UAVCAN bootloader to be flashed. The bootloader can be built as follows:
cd bootloader make clean && make -j8 cd ..
The bootloader image is located at
bootloader/firmware/bootloader.bin, and the OpenOCD configuration is located at
openocd.cfg. Follow these instructions to install the bootloader on the ESC.
cd firmware make RELEASE=1 # RELEASE is optional; omit to build the debug version
Beware, some newer version of GCC lead to segfaults during linking. Version 4.9 did work at the time of writing.
The firmware image will be located at
<xxxxxxxx> is an arbitrary sequence of numbers and letters. There are two hardware version of the Zubax Orel 20 (1.0 and 1.1). Make sure you copy the binary to the correct folder in the subsequent description. The ESC firmware will check the hardware version and works on both products.1
Please refer to the project page to learn how to build and flash the firmware. Zubax GNSS comes with a UAVCAN-capable bootloader, so its firmware can be updated in a uniform fashion via UAVCAN as described below.
The UAVCAN node file names follow a naming convention which allows the Pixhawk to update all UAVCAN devices on the network, regardless of manufacturer. The firmware files generated in the steps above must therefore be copied to the correct locations on an SD card or the PX4 ROMFS in order for the devices to be updated.
The convention for firmware image names is:
<uavcan name>-<hw version major>.<hw version minor>-<sw version major>.<sw version minor>.<version hash>.bin
However, due to space/performance constraints (names may not exceed 28 charates), the UAVCAN firmware updater requires those filenames to be split and stored in a directory structure like the following:
/fs/microsd/fw/<node name>/<hw version major>.<hw version minor>/<hw name>-<sw version major>.<sw version minor>.<git hash>.bin
The ROMFS-based updater follows that pattern, but prepends the file name with
_ so you add the firmware in:
/etc/uavcan/fw/<device name>/<hw version major>.<hw version minor>/_<hw name>-<sw version major>.<sw version minor>.<git hash>.bin
The resulting finale file locations are:
- S2740VC ESC:
- Pixhawk ESC 1.6:
- Pixhawk ESC 1.4: `ROMFS/px4fmu_common/uavcan/fw/org.pixhawk.sapog-v1/1.4/_sapog-v1-1.4.
- Zubax GNSS v1:
- Zubax GNSS v2:
Note that the ROMFS/px4fmu_common directory will be mounted to /etc on Pixhawk.
When using the PX4 Flight Stack, enable UAVCAN in the 'Power Config' section and reboot the system before attempting an UAVCAN firmware upgrade.
Alternatively UAVCAN firmware upgrading can be started manually on NSH via:
uavcan start uavcan start fw