USB Firmware Compilation
- The ERCF factory-default CAN-connected Katapult firmware
- If using USB firmware flashing, the USB Katapult firmware needs to be flashed
- Once flashed, no need to flash again
- Katapult Firmware Flashing
Getting Started with 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.
- Please do not use the
ROOT
user.
- Command to switch users
su fly
- 请确保上位机可以正常联网
- 固件编译前需要使用SSH通过网络登录上位机
- 请不要使用串口工具登录上位机
Klipper固件编译和配置页面操作说明
请确保键盘输入法为半角模式,即英文模式
- 键盘上键
↑
,下键↓
,用于上下移动光标来选中菜单项 - 确认键
Enter
或 空格键Space
,用于勾选菜单或进入子菜单 - 退出键
ESC
,用于返回上一级菜单 Q
键,用于退出Klipper固件配置页面Y
键,在退出Klipper固件配置页面时,如果有提示,则点击Y
键保存配置文件
如果配置页面选项比较少,请先勾选[ ] Enable extra low-level configuration options
,用于显示部分隐藏选项
Below is an introduction on how to compile the firmware:
-
After connecting to 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
is to delete previous compilation data and firmware.make menuconfig
is for compiling the firmware, after which the following interface should appear: -
Select Enable extra low-level configuration options and press Enter
-
Enter the menu Micro-controller Architecture then select Raspberry Pi RP2040 and press Enter
-
Select Bootloader offset, choose: 16KiB bootloader
-
Communication interface, choose: USBSERIAL
-
Select GPIO pins to set at micro-controller startup, input: gpio17
-
Press
Q
key, then Save configuration appears, pressY
key now -
Now the configuration should be saved and you are back to the command line interface
-
Input
make -j4
to start compilation, it takes a bit of time -
The following output indicates successful compilation
Linking out/klipper.elf
Creating hex file out/klipper.bin
Confirming Flash Mode Entry
- Please ensure that the upper computer can connect to the network normally, and ensure that the data cable connecting the lower computer to the upper computer has a data transmission function.
- After SSH connection to the upper computer, enter
lsusb
and press Enter. If the information circled in the picture below appears, you can proceed to the next step.- If there is no information feedback, this is a system problem of the upper computer. We can do nothing about it. You need to replace the system that is determined to be normal or replace the upper computer.
- If it is prompted that there is no
lsusb
instruction, you can execute this command to installsudo apt-get install usbutils
1d50:6177
belongs to the device you will use this time. The suffixOpenMoko, Inc. stm32f407xx
has a certain reference value, but it is not used as a judgment basis.- Some upper computers may not display completely or not display at all due to system problems.
- If the device can be displayed when the
lsusb
instruction is entered, but there is no1d50:6177
, please try to replace the data cable and try to connect the motherboard to other USB ports of the upper computer.
- If you have previously performed the above steps and successfully burned the Klipper firmware, and the motherboard is operating normally, but only need to update the Klipper firmware, please directly check the
Firmware Update
chapter in the menu bar on the right side of this page.
The next step can only be carried out after the 1d50:6177
device is found.
Flashing the Firmware
Use the Katapult firmware to conveniently update the firmware via SSH in the future, without needing to enter DFU mode for firmware burning.
Installation of Flashing Plugin
Please note that installing the flashing plugin requires an internet-connected host machine. If it has already been installed, there is no need to install it again.
-
Install
pip install pyserial
pip install pyserial
-
If prompted with
-bash: pip: command not found
, execute the following:sudo apt-get install pip
-
If you encounter the error shown below, execute the following:
pip install pyserial --break-system-packages
Start Flashing Firmware
-
Use the following command to search for your device's serial port address:
ls /dev/serial/by-id/*
-
Below is a reference:
-
To flash the firmware, use the following command. Ensure that the firmware has been compiled and note that there should be no space after
=
. -
Please ensure you are in the klipper directory to flash the firmware.
make flash FLASH_DEVICE=
-
Below is a reference:
-
After flashing, refer to the following:
Method to Update Firmware
-
To update the USB firmware, input the following command after compiling the latest firmware. Note that there should be no space after
=
.make flash FLASH_DEVICE=
-
To update the USB bridge CAN firmware, input the following command after compiling the latest firmware to reset into Katapult.
-
Please note that this command can only be executed on the klipper firmware for the USB bridge CAN; executing it on other firmwares will result in errors.
~/klippy-env/bin/python3 ~/katapult/scripts/flashtool.py -i can0 -r -u <MCU ID>
-
After resetting into Katapult, execute the following command to update the firmware:
make flash FLASH_DEVICE=<your device serial port address>
Solution for Incorrect Firmware Flashing
- Power off the motherboard, then power it back on and quickly click the reset button twice.
- Alternatively, use WINDOWS to clean the firmware and then reflash BL
Confirming Firmware Boot
- If the firmware starts up normally, the LED will light up