Skip to main content

Firmware Compilation

Start Compilation

Brief Guide to Firmware Compilation

Notes

  • Network: Ensure the host (Raspberry Pi, etc.) is connected to the internet.
  • Login Method: Must log in via SSH over the network; serial port access 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.

Switch User:

  • Standard System (Official Raspberry Pi system, etc.)
    Do not use root; switch to a regular user:
    su <username>
  • FLY Host System (FlyOS-FAST system)
    Only supports login as root user (password: mellow)

Firmware Compilation Operation Guide

In the Klipper firmware configuration interface, only keyboard operations are supported; the mouse cannot be used.

KeyFunction
↑ / ↓Move cursor up/down to select menu items
Enter / SpaceConfirm selection, check options, or enter submenus
ESCReturn to the previous menu
QExit the configuration interface
YIf prompted when exiting, press Y to save the configuration

Starting Firmware Compilation

The following describes how to compile firmware:

  • After connecting via 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/out removes previous compilation data and firmware

  • make menuconfig compiles the firmware; after execution, you should see the interface below

    Loading...
  • Select Enable extra low-level configuration options and press Enter

    Loading...
  • Enter the Micro-controller Architecture menu, then select Raspberry Pi RP2040/RP235x and press Enter

    Loading...
  • Select Bootloader offset, choose: NO bootloader

    Loading...
  • Communication interface, select: USBSERIAL

    Loading...
  • Select GPIO pins to set at micro-controller startup, input: gpio8
    Loading...
  • Press the Q key; Save configuration appears, then press the Y key
    Loading...
  • The configuration should now be saved and you should return to the command line interface
  • Enter the following command to start compilation; this may take some time
make -j4
Loading...
  • If the output below appears at the end, compilation is successful
  • Due to Klipper version issues, as long as out/klipper.bin appears, it indicates success
    Linking out/klipper.elf
    Creating uf2 file out/klipper.uf2

Enter Flash Mode

Tip

The circled area is the BOOT button

  • To enter flash mode, the mainboard must be completely powered off. Press and hold the BOOT button, then connect one end of a data-capable USB cable to the mainboard and the other end to the host computer.
    Loading...

Flash Firmware

  • Note that the current toolboard is in firmware flashing mode, and only firmware with the .uf2 suffix can be flashed.

  • Use the following command to flash the firmware onto the toolboard:

    cd && cd ~/klipper/
    make flash FLASH_DEVICE=2e8a:0003
    Tip

    If this is the first flash after setting up the system on the host machine, you may see a prompt similar to the one highlighted in the red circle in the image below—some red hints may appear. This is normal and not an error.

    Loading...

Confirm Firmware Startup

  • If the firmware starts normally, the LED will light up
Loading...
Loading...