Skip to main content

USB Bridge CAN Firmware Flashing

Connecting to the Host Computer

Core Connection Limitation

The Fly-D8 mainboard can only communicate with the host computer for Klipper via the Type-C USB interface.

Loading...

Firmware Compilation Quick Guide

Precautions

  • 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 (Official Raspberry Pi OS, etc.)
    Do not use root. Switch to a regular user:
    su <username>
  • FLY Host Machine (FlyOS-FAST System)
    Only supports logging in as the root user (password: mellow).

Firmware Compilation Operation Guide

In the Klipper firmware configuration interface, only keyboard operations are supported; mouse usage is not possible.

KeyFunction
↑ / ↓Move cursor up/down to select menu items
Enter / SpaceConfirm selection, toggle options, or enter submenus
ESCReturn to the previous menu level
QExit the configuration interface
YWhen exiting, press Y to save the 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
  • rm -rf ~/klipper/.config && rm -rf ~/klipper/out deletes previous compilation data and firmware.

  • make menuconfig compiles the firmware. After execution, the interface below should appear.

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

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

    Loading...
  • Navigate to the Processor model menu, select STM32F407, and press Enter.

    Loading...
  • Select Bootloader offset, choose: 32KiB bootloader.

    Loading...
  • Select Communication interface, choose: USB to CAN bus bridge (USB on PA11/PA12).

    Loading...
  • Press the Q key. When Save configuration appears, press the Y key.
    Loading...
  • The configuration should now be saved, and you should exit back to the command line interface.
  • Enter the command below to start compilation. This process may take some time.
make -j4
Loading...
  • The compilation is successful if the following content is output at the end.
  • Due to Klipper version differences, the appearance of out/klipper.bin alone indicates success.
    Linking out/klipper.elf
    Creating bin file out/klipper.bin

Entering Flashing Mode

  • After connecting the mainboard to the host computer using a Type-C data cable, double-click the RST button. At this point, the LED on the mainboard will flash.
Loading...

Flashing the Firmware

Start Flashing

  • Non-FLY official host computers require Katapult installation
  • Install Katapult

Obtain Board ID

Execute the following command to search for the device ID. Under normal circumstances, 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 indicates you can proceed to the next step.

Loading...

Flash Firmware

⚠️ Preparations
  • Ensure the firmware file has been compiled.
  • Replace <Your Board ID> in the command below with the actual ID obtained in the previous step.
  • For regular host computers, use the following code:
    ~/klippy-env/bin/python ~/katapult/scripts/flashtool.py -d <Your Board ID>
  • For FLY host computers, use the following code:
    python3 ~/katapult/scripts/flashtool.py -d <Your Board ID>

Flashing Process Reference:

Loading...

Successful Flashing Reference:

Loading...

Firmware Update

USB Firmware Update Steps

  1. Query Board ID
ls /dev/serial/by-id/*
Key Identification Point

In the image below, /dev/serial/by-id/usb-katapult_rp2040_E662549553642032-if00 is the board ID.

Loading...
  1. Update Firmware
cd ~/klipper/ && make flash FLASH_DEVICE=<Your Board ID>
Note
  • Replace <Your Board ID> with the actual ID you queried.
Loading...

Solutions for Flashing Incorrect Firmware

Method 1: Quickly Enter Flashing Mode

  1. Power off the board.
  2. After powering on again, quickly double-click the RESET button.
  3. Re-enter flashing mode.

Method 2: Re-flash Katapult Firmware

Click to view Katapult Firmware Flashing Guide
Loading...