Skip to main content

RS232 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

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
  • Where rm -rf ~/klipper/.config && rm -rf ~/klipper/out deletes previous compilation data and firmware

  • make menuconfig compiles the firmware, and after execution, the following interface should appear

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

    Loading...
  • Enter the menu Micro-controller Architecture and select STMicroelectronics STM32, then press Enter

    Loading...
  • Enter the menu Processor model, select STM32H723, and press Enter

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

    Loading...
  • Select Clock Reference (8 MHz crystal), choose:25 MHz crystal

    Loading...
  • Communication interface, select:Serial (on USART1 PA10/PA9)

    Loading...
  • Select GPIO pins to set at microcontroller startup, input: !PA15 Note: The exclamation mark is uppercase.
    Loading...
  • Press the Q key, when Save configuration appears, then press the Y key
    Loading...
  • The configuration should now be saved and you will be returned to the command line interface
  • Enter the following command to start compilation; it may take some time
make -j4
Loading...
  • If the following content is output at the end, the compilation is successful
  • Due to Klipper version issues, the appearance of out/klipper.bin alone indicates success
    Linking out/klipper.elf
    Creating bin file out/klipper.bin

Enter Flashing Mode

Tip

The top is the RESET button, and the bottom is the BOOT button

  • There are two methods to enter DFU
  • First method: With the mainboard completely powered off, hold the BOOT button, then connect one end of a data cable (with data transmission capability) to the mainboard and the other end to the host computer.
  • Second method: Connect one end of a data cable (with data transmission capability) to the mainboard and the other end to the host computer. Hold the BOOT button, then press the RST button. Release the RST button, and finally release the BOOT button.
    Loading...

Flash Firmware

  1. Install the Flashing Tool

    • No need to install a flashing tool for FLY host machines.
    • If installation is needed, note: The host machine must have internet access for a successful installation.
    • Skip this step if it has already been installed.
    sudo apt update
    sudo apt install dfu-util -y
  2. Execute the command below to check if the connection is successful.

    lsusb
    • If no DFU device is found, try re-entering flashing mode.

    • Due to system version differences, it may display a different name. If 0483:df11 appears, it indicates entry into flashing mode.

      Loading...
  3. Flash the Firmware

    • Execute the code below to start flashing.
    sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000 -D ~/klipper/out/klipper.bin
  4. The flashing is successful when the following message appears: File downloaded successfully

    Loading...
    Tip

    After flashing, power off the motherboard completely once.

Confirm Firmware Startup

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