USB Firmware Compilation
Firmware Compilation Quick Guide
Important Notes
- Network: Ensure the host machine (Raspberry Pi, etc.) is connected to the network.
- Login Method: Must log in via SSH over the network; serial port login is disabled.
- 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 cannot be used.
| Key | Function |
|---|---|
| ↑ / ↓ | Move cursor up/down to select menu items |
| Enter / Space | Confirm selection, check options, or enter submenus |
| ESC | Return to the previous menu |
| Q | Exit the configuration interface |
| Y | When exiting, press Y to save configuration if prompted |
Start Firmware Compilation
The following describes how to compile the firmware:
-
After connecting via SSH, enter the following command and press Enter:
cd ~/klipper && rm -rf ~/klipper/.config && rm -rf ~/klipper/out && make menuconfig -
Among these,
rm -rf ~/klipper/.config && rm -rf ~/klipper/outdeletes previous compilation data and firmware. -
make menuconfigis for compiling 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 and select STMicroelectronics STM32, then press Enter.
Loading... -
Go to the menu Processor model, select STM32F405, and press Enter.
Loading... -
Select Bootloader offset, choose: 32KiB bootloader.
Loading... -
For Communication interface, select: USB (on PA11/PA12).
Loading...
- Press the
Qkey, and Save configuration will appear. Then 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. It may take some time.
make -j4
- 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
Firmware Flashing
Execute the following command to flash the firmware
fly-flash -d auto -h -f /data/klipper/out/klipper.bin
Searching for USB ID
- Open your browser, enter the IP address of the host computer in the address bar. For example, if my host IP is
192.168.101.179, just type it and press Enter.
- Open the host's WEB interface. In the left sidebar configuration options, find:
Loading... |
Loading... |
- Click
printer.cfgto enter, then clickDEVICESin the top right corner.
Loading... | Loading... |
- Click
SERIAL, then refresh.
Loading... |
Loading... |
- Copy the ID. Click where the arrow points to copy.
Loading... |
Loading... |
Filling in the USB ID
Please note, the ID below cannot be used!!!!
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
- Close
DEVICESand fill in the ID.
- In the configuration file, change:
[mcu]
serial: /tmp/klipper_host_mcu
to:
[mcu host]
serial: /tmp/klipper_host_mcu
- Add:
[mcu]
serial: <Replace this with the ID you just queried>
Loading... |
Loading... |
- Fill the ID into the configuration.
- After filling in the ID, click
SAVE & RESTARTin the top right corner.
Loading... | Loading... |
- If Klipper prompts
ADC out of range, this is normal. Connect the heated bed and thermistor to the mainboard, configure the thermistor pins for the hotend and heated bed, then save and restart.
Note: All IDs appearing in this document are examples. The actual ID for each mainboard is different. Please fill in the ID you actually obtained.