Skip to main content

USB Firmware Compilation

tip
  • Super8 is pre-flashed with the TF card bootloader from the factory, no need to flash it again

Start Compilation

  • A host computer with the klipper service installed is required. Connect SSH via network
  • And the device should be well connected to the host computer.
  • Note: Please use a common host computer, such as Raspberry Pi, FLY Pi, etc. If it is a modified host computer (such as WiFi stick, Redmi, etc.), due to too many problems with this type of host computer, technical support cannot be provided for you.
Precautions
  • Please do not use the ROOT user.
  • Command to switch users
su fly
tip
  • 请确保上位机可以正常联网
  • 固件编译前需要使用SSH通过网络登录上位机
  • 请不要使用串口工具登录上位机

Klipper固件编译和配置页面操作说明

tip

请确保键盘输入法为半角模式,即英文模式

  1. 键盘上键,下键,用于上下移动光标来选中菜单项
  2. 确认键Enter 或 空格键Space,用于勾选菜单或进入子菜单
  3. 退出键ESC,用于返回上一级菜单
  4. Q键,用于退出Klipper固件配置页面
  5. Y键,在退出Klipper固件配置页面时,如果有提示,则点击Y键保存配置文件
warning

如果配置页面选项比较少,请先勾选[ ] Enable extra low-level configuration options,用于显示部分隐藏选项

Below is an introduction on how to compile the firmware:

  • After connecting to SSH, enter the command below and press Enter:

    cd ~/klipper && rm -rf ~/klipper/.config && rm -rf ~/klipper/out && make menuconfig
  • Among them, rm -rf ~/klipper/.config && rm -rf ~/klipper/out is to delete previous compilation data and firmware, and make menuconfig is to compile the firmware. After execution, the following interface should appear:

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

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

  • Enter the menu Processor model, select STM32F407 and press Enter

  • Select Bootloader offset, choose: 32KiB bootloader

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

  • Press Q, then Y when Save configuration appears

  • Configuration should now be saved and you should be back to the command line

  • Enter make -j4 to start compiling, it will take some time

  • The following output indicates successful compilation

    Linking out/klipper.elf
    Creating hex file out/klipper.bin

Flashing the Firmware

Preparation

  • Before flashing the firmware, please first connect via SSH using the network
  • Counterfeit memory cards may cause flashing failure, please try to use the recommended memory cards below for firmware update
  • Prepare a TF card with a capacity not exceeding 32G, and it is recommended that the transfer speed of the TF card must be class10 or higher, it is suggested to use brands like SanDisk for the TF card

Download Firmware

  1. Use the prepared TF card
  2. Format using SDFormatter
  3. Use MobaXterm_Personal to navigate to the file directory on the left side, find klipper, then open out
  4. Download klipper.bin to the TF card and rename it to firmware.bin
  5. Power off the motherboard, insert the TF card into the motherboard
  6. On the motherboard, wait for 10 seconds
  7. Remove the TF card and insert it back into the computer. If the firmware.bin in the SD card disappears and FLY.CUR appears, the flashing is successful.

Flashing the Firmware 2

  • Follow the picture 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
  • After entering and pressing Enter, the content in the picture below will be displayed, indicating that the motherboard has successfully entered dfu mode
  1. Flash Firmware
  • Here is the dfu flashing command
    cd ~/klipper
    make flash FLASH_DEVICE=0483:df11
  1. If you see the content indicated by the arrow below, File downloaded successfully, then the flashing was successful
warning

Ignore the error message following the line indicated by the red arrow!!!

tip

After flashing, remove the motherboard jumper cap and press the rst button to restart the motherboard