CAN Firmware Compilation
Start Compilation
- A host machine with the installed
klipper
service is required Connect via SSH over the network - Make sure the device is connected to the host machine
- Note: Please use a regular host machine, such as a Raspberry Pi FLY board, etc. If it's a modified host machine (e.g., WiFi stick, Redmi, etc.), due to too many issues, we cannot provide technical support for these machines
- To switch from the
ROOT
user to a regular user, you can enter the command below - Do not use the
ROOT
user - For the fly user, you can directly enter:
su fly
. For non-fly users, please replace<your host machine username>
with your host machine's username!
su <your host machine username>
- 请确保上位机可以正常联网
- 固件编译前需要使用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 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 then select Raspberry Pi RP2040 and press Enter
-
Select Bootloader offset, select: 16KiB bootloader
-
Select Communication interface, select: CAN bus
-
Select
(4) CAN RX gpio number
, delete4
and input1
-
Select
(5) CAN TX gpio number
, delete5
and input0
- Select GPIO pins to set at micro-controller startup, input: !gpio5
Please enter in English input mode: !gpio5,!gpio19,!gpio24

-
Press
Q
, then a Save configuration will appear, pressY
again -
Now the configuration should be saved and exited to the command line interface
-
Enter
make -j4
to start compilation, it takes some time -
If the following content is output, the compilation is successful
Linking out/klipper.elf
Creating hex file out/klipper.bin
Search for Devices
- Please ensure that the host machine can connect to the internet normally, and ensure that the data cable connecting the sub-machine to the host machine has data transmission capabilities.
- After SSH connecting to the host machine, enter
lsusb
and press Enter. If the information circled in the following image appears, you can proceed to the next step.- If there is no feedback information, this is a system issue with the host machine, and we are unable to help. You need to replace it with a normal system or replace the host machine.
- If there is a提示 of no
lsusb
command, you can execute the following command to install it:sudo apt-get install usbutils
1d50:606f
belongs to the device you will be using this time. The suffixOpenMoko, Inc. Geschwister Schneider CAN adapter
has some reference value but is not used as a basis for judgment.- Some host machines may display incompletely or not at all due to system issues.
- If entering the
lsusb
command displays the device, but does not show1d50:606f
, please try replacing the data cable and attempt to connect the motherboard to another USB port on the host machine.
- If you have executed the above steps previously and successfully burned the Klipper firmware, and the motherboard is operating normally, but you only need to update the Klipper firmware, please directly refer to the
Firmware Update
section in the right-hand menu bar of this page.
You can only proceed to the next step when there is 1d50:606f
.
Burn Firmware
- Before burning the firmware, use an XT30 data cable to connect the tool board to UTOC or the mainboard with bridge firmware installed. Below is a reference wiring diagram.
- Please check if the DIP switch is set correctly
- Please ensure that the resistance between CAN H and CAN L is around
60Ω
when measured with a multimeter under power-off conditions. If it is120Ω
, the120Ω
DIP switch needs to be turned on; if it is around40Ω
, the DIP switch needs to be turned off.
- It is recommended not to perform ID finding and firmware flashing during the printing process.
- The CAN firmware IDs of the same motherboard or tool board Katapult are completely consistent with the Klipper CAN firmware IDs.
- Ensure that the CAN network of the host computer has been configured.
- You can use the following command to search for the CAN ID only when
1d50:606f
appears after runninglsusb
. - The CAN rate of the tool board must be consistent with the host computer; otherwise, the ID cannot be found and burned.
-
Execute the following command to query the CANBus UUID:
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
-
After entering, you will encounter one of the following situations based on your machine. Below are references:
- First case: A motherboard with bridge firmware installed displays an ID and prompts
Application: Klipper
. - Second case: A motherboard with bridge firmware installed, along with a tool board that requires firmware burning, displays two IDs.
- Third case: Using UTOC with a tool board that requires firmware burning.
- Tip: UTOC does not display the ID.
- Fourth case: No ID prompt, generally due to Klipper occupation, incorrect CAN0 rate of the host computer, or wiring abnormalities.
- First case: A motherboard with bridge firmware installed displays an ID and prompts
-
Normally, if the tool board that needs to be burned is in CANBOOT mode, it will prompt
Application: CanBoot
, and the corresponding firmware light will flash. At this point, you need to burn the Klipper firmware; otherwise, it cannot be connected!!! -
Tip: If it is a Klipper firmware and the ID has been filled into the configuration, the ID will not be displayed and will be occupied by Klipper. You need to shield the corresponding ID and power off/restart the mainboard completely.
warning- If no UUID is queried, please refer to the following document.
- CAN Problem Collection
-
Firmware Burning
-
Replace
241696050c56
in the following command with the UUID found during the query. Please note that there is a space after-u
.python3 ~/klipper/lib/canboot/flash_can.py -u 241696050c56
-
As shown in the figure below, if
CAN Flash Success
appears, the burning is successful.
If you need to update the firmware, just re-execute the burning instruction after compiling the firmware, but ensure that the ID can be found or Klipper is already connected.
python3 ~/klipper/lib/canboot/flash_can.py -u <MCU ID>

Confirm Firmware Startup
- If the firmware starts up normally, the LED will light up