Skip to main content
Installs the firmware that ships with axol (almond_axol/hub/axol_hub.uf2) on the Axol Hub or the Mantis Hub. Both hubs are the same board and run the same firmware. The hub restarts into its bootloader, takes the new image and comes back as a CAN adapter. Both of its buses go quiet for a few seconds while it restarts. Flashing needs root. Run the command as your normal user: it finds the hubs and asks its questions first, then asks for your sudo password.
You rarely need this command for the Axol Hub. Every operation that connects the arms, such as teleop, data collection, policy runs and control panel operations, checks the hub’s firmware and updates an outdated hub before it opens a bus. If the update can’t get root, the operation runs on the old firmware and logs an error that names axol hub.flash. Set AXOL_HUB_FLASH=0 to turn off the automatic update.The Mantis Hub is not updated automatically. Plug it in and run axol hub.flash.
If hub.flash says the hub’s firmware is too old to update over USB, flash it once by hand:
  1. Unplug the hub.
  2. Flip the BOOTSEL switch next to the hub’s USB port.
  3. Plug the hub back in. It starts in its bootloader.
  4. Run axol hub.flash. It reports that the hub restarted into its bootloader.
  5. Flip the BOOTSEL switch back, then unplug the hub and plug it back in. The hub starts the new firmware.
The hub reads the switch only when it powers on, so replug the hub after each flip. After this manual flash, updates are automatic.The same steps recover a hub whose LED is on but that never shows a CAN interface in ip link show. If a flash was interrupted and the hub is stuck in its bootloader, arm bring-up fails. Run hub.flash again to recover it.
A bootloader doesn’t identify itself, so it could belong to any RP2350 board. hub.flash asks before it flashes one. Without a terminal it prints the --port command instead. Pass --port to flash it without asking. The hub firmware drops queued motor commands when a bus stops responding. A command sent right before an emergency stop can’t reach the motors when power returns. The firmware also reports when nothing on a bus acknowledges frames, which is how Axol detects that motor power was cut. See can.setup.