USB Firmware Compilation
Connect to the Host Computer
The Fly-D8 motherboard can only communicate with the host computer for Klipper via the Type-C USB interface.
Below is an introduction on how to compile the firmware:
-
After connecting via SSH, enter the following command and press the
Enterkey: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, andmake menuconfigcompiles the firmware. After execution, the following interface should appear:Loading... -
Select
Enable extra low-level configuration optionsand press theEnterkey:Loading... -
Navigate to the
Micro-controller Architecturemenu, then selectSTMicroelectronics STM32and press theEnterkey:Loading... -
Enter the
Processor modelmenu, selectSTM32H723, and press Enter:Loading... -
Select
Bootloader offsetand choose:128KiB bootloader:Loading... -
Select
Clock Reference (8 MHz crystal)and choose:25 MHz crystal:Loading... -
For
Communication interface, select:USB (on PA11/PA12):Loading...
- Press the
Qkey, and when Save configuration appears, press theYkey:Loading... - The configuration should now be saved, and you will exit back to the command line interface.
- Enter the following command to start compilation. This may take some time:
make -j4Loading... - If the following content is output at the end, the compilation is successful.
- Due to Klipper version differences, as long as
out/klipper.binappears, it indicates success:Linking out/klipper.elf
Creating bin file out/klipper.bin
Enter Flashing Mode
- After connecting the motherboard to the host computer using a Type-C data cable, double-click the RST button. At this point, the LED on the motherboard will blink.
Flash the Firmware
Start Flashing
- Non-FLY official host computers need to install Katapult
- Install Katapult
Get the Board ID
Execute the following command to search for the device ID. Normally, 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 means 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 obtained in the previous step.
- For regular host computers, use the code below:
~/klippy-env/bin/python ~/katapult/scripts/flashtool.py -d <Your Board ID> - For FLY host computers, use the code below:
python3 ~/katapult/scripts/flashtool.py -d <Your Board ID>
Flashing Process Reference:
Successful Flashing Reference:
Firmware Update
- USB Firmware Update
- Bridged 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 ID obtained from the query.
Bridged CAN Firmware Update Steps
- Reset to Enter Flashing Mode
<Your Board ID> is the CANBUS UUID of the board in the printer.cfg configuration file.
- For regular host computers, use the code below:
~/klippy-env/bin/python3 ~/katapult/scripts/flashtool.py -i can0 -r -u <Your Board ID> - For FLY host computers, use the code below:
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 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.