USB Firmware Compilation
Start Compilation
- You need an upper computer with the
klipperservice installed Connect via SSH over the network - And make sure the device is connected to the upper computer
- Note: Please use a regular upper computer, such as a Raspberry Pi FLY board, etc. If you are using a modified upper computer, we cannot provide much assistance due to too many issues.
- Do not use the
ROOTuser
- 请确保上位机可以正常联网
- 固件编译前需要使用SSH通过网络登录上位机
- 请不要使用串口工具登录上位机
Klipper固件编译和配置页面操作说明
请确保键盘输入法为半角模式,即英文模式
- 键盘上键
↑,下键↓,用于上下移动光标来选中菜单项 - 确认键
Enter或 空格键Space,用于勾选菜单或进入子菜单 - 退出键
ESC,用于返回上一级菜单 Q键,用于退出Klipper固件配置页面Y键,在退出Klipper固件配置页面时,如果有提示,则点击Y键保存配置文件
如果配置页面选项比较少,请先勾选[ ] Enable extra low-level configuration options,用于显示部分隐藏选项
Below is an introduction on how to compile the firmware:
-
After connecting to SSH, enter the following command and press Enter:
cd ~/klipper && rm -rf ~/klipper/.config && rm -rf ~/klipper/out && make menuconfig -
Where
rm -rf ~/klipper/.config && rm -rf ~/klipper/outis to delete previous build data and firmware,make menuconfigis for compiling the firmware, after which the following interface should appear
-
Select Enable extra low-level configuration options and press Enter

-
Enter the menu Micro-controller Architecture then select STMicroelectronics STM32 and press Enter

-
Enter the menu Processor model, select STM32F405 and press Enter

-
Select Bootloader offset, choose: 32KiB bootloader

-
For Communication interface, choose: USB (on PA11/PA12)

-
Press
Qkey, then pressYkey when Save configuration appears -
The configuration should now be saved and you should be back to the command line interface
-
Enter
make -j4to start compilation, which might take some time
-
The compilation is successful if the following content is output
Linking out/klipper.elf
Creating hex file out/klipper.bin
Firmware Flashing
Execute the following command to flash the firmware
sudo fly-flash -d gemini-v3 -h -f ~/klipper/out/klipper.bin
Flashing Firmware
- dfu flashing
*Follow the images below to insert the jumper cap on boot1 and then press rst to restart the motherboard

*Enter the following command to check if the motherboard has entered dfu mode
lsusb
*Press Enter after inputting the command, it will output the content shown in the image below indicating the motherboard has successfully entered dfu mode

- Flash the firmware
- Here are the dfu flashing commands
cd ~/klippermake flash FLASH_DEVICE=0483:df11
- If the content shown by the arrow in the image below appears, then the firmware has been successfully flashed
Please ignore the error after the line indicated by the red arrow!!!

After flashing is complete, remove the motherboard jumper cap and press the rst button on the motherboard to restart it