USB-to-CAN Bridge Firmware Flashing
Connecting to the Host Computer
The Fly-DP5 mainboard can only communicate with the host computer for Klipper via the Type-C USB port.
Firmware Compilation Quick Guide
Notes
- Network: Ensure the host machine (Raspberry Pi, etc.) is connected to the network.
- Login Method: Must use SSH to log in via the network; disable serial port.
- Input Method: Keep the keyboard in English half-width mode.
SSH Login and User Switching
Use tools like MobaXterm, PuTTY, etc., to SSH into the host machine.
Switching Users:
- Standard Systems (Raspberry Pi official system, etc.)
Do not useroot. Switch to a regular user:su <username> - FLY Host Machine (FlyOS-FAST system)
Only supports logging in as therootuser (password:mellow).
Firmware Compilation Operation Guide
In the Klipper firmware configuration interface, only keyboard operations are supported; mouse usage is not possible.
| Key | Function |
|---|---|
| ↑ / ↓ | Move the cursor up/down to select menu items |
| Enter / Space | Confirm selection, toggle options, or enter submenus |
| ESC | Return to the previous menu |
| Q | Exit the configuration interface |
| Y | When exiting, press Y if prompted to save the configuration |
Start Firmware Compilation
The following describes how to compile the firmware:
-
After connecting via SSH, enter the command below and press Enter:
cd ~/klipper && rm -rf ~/klipper/.config && rm -rf ~/klipper/out && make menuconfig -
Here,
rm -rf ~/klipper/.config && rm -rf ~/klipper/outdeletes previous compilation data and firmware. -
make menuconfigcompiles the firmware. After execution, the following interface should appear:Loading... -
Select Enable extra low-level configuration options and press Enter.
Loading... -
Navigate to the menu Micro-controller Architecture, then select STMicroelectronics STM32 and press Enter.
Loading... -
Go to the menu Processor model, select STM32F072, and press Enter.
Loading... -
Select Bootloader offset, then choose: 8KiB bootloader.
Loading... -
Select Communication interface, then choose: USB to CAN bus bridge (USB on PA11/PA12) and press Enter.
-
After selecting USB to CAN bus bridge (USB on PA11/PA12), the default parameter CAN bus interface (CAN bus (on PB8/PB9))---> does not need to be changed.
Loading... -
Please compare with the image below to ensure consistency before proceeding with compilation.
Loading...
- Press the
Qkey. When Save configuration appears, press theYkey.Loading... - The configuration should now be saved, and you will return to the command line interface.
- Enter the command below to start compilation. This process may take some time.
make -j4
- If the following content appears at the end, the compilation is successful.
- Due to Klipper version differences, the appearance of
out/klipper.binindicates success.Linking out/klipper.elf
Creating bin file out/klipper.bin
Entering Flashing Mode
- After connecting the mainboard to the host computer using a Type-C data cable, double-click the RST button. At this point, the LED on the mainboard will flash.
Flashing the Firmware
Start Flashing
- Non-FLY official host computers require Katapult installation
- Install Katapult
Get the Board ID
Execute the following command to search for the device ID. Under normal circumstances, an ID similar to the one shown in the image below should be displayed (Note: Each board has a different ID):
ls /dev/serial/by-id/*
If the searched ID contains
usb-katapult_stm32xxxxxxxx, it indicates you can proceed to the next step.
Flash the Firmware
- Ensure the firmware file has been compiled.
- Replace
<Your Board ID>in the commands below with the actual ID queried in the previous step.
- For regular host computers, use the following code:
~/klippy-env/bin/python ~/katapult/scripts/flashtool.py -d <Your Board ID> - For FLY host computers, use the following code:
python3 ~/katapult/scripts/flashtool.py -d <Your Board ID>
Flashing Process Reference:
Successful Flashing Reference:
Firmware Update
- USB Firmware Update
- Bridge CAN Firmware Update
USB Firmware Update Steps
- Query the Board ID
ls /dev/serial/by-id/*
In the image below, /dev/serial/by-id/usb-katapult_rp2040_E662549553642032-if00 is the board ID.
- Update the Firmware
cd ~/klipper/ && make flash FLASH_DEVICE=<Your Board ID>
- Replace
<Your Board ID>with the actual queried ID.
Bridge CAN Firmware Update Steps
- Reset to Enter Flashing Mode
<Your Board ID> refers to the CANBUS UUID of the board as configured in the printer.cfg file.
- For regular host computers, use the following code:
~/klippy-env/bin/python3 ~/katapult/scripts/flashtool.py -i can0 -r -u <Your Board ID> - For FLY host computers, use the following code:
python3 ~/katapult/scripts/flashtool.py -i can0 -r -u <Your Board ID>
In the image below, f95cee90e1f9 is the board's CANBUS UUID (for example purposes only).
- Query the New Device ID
ls /dev/serial/by-id/*
- This is just a reference!
- In the image below,
/dev/serial/by-id/usb-Klipper_stm32f072xb_38001B000551324752333720-if00is the newly recognized board ID.
- Flash the New Firmware
cd ~/klipper/ && make flash FLASH_DEVICE=<Your Board ID>
Solutions for Flashing the Wrong Firmware
Method 1: Quickly Enter Flashing Mode
- Power off the board.
- After powering on again, quickly double-click the RESET button.
- Re-enter flashing mode.