RS232 Firmware Compilation
Start Compilation
- You need an upper computer with the
klipper
service installed Connect via SSH over the network - And make sure the device is connected to the upper computer
- Note: Please use a regular upper computer, such as a Raspberry Pi FLY board, etc. If you are using a modified upper computer, we cannot provide much assistance due to too many issues.
- Do not use the
ROOT
user
- 请确保上位机可以正常联网
- 固件编译前需要使用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 command below 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, andmake 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 Raspberry Pi RP2040 and press Enter
-
Select Bootloader offset, choose: NO bootloader
-
Select Communication interface, choose: UART0 on GPIO0/GPIO1
- Select GPIO pins to set at micro-controller startup, input: !gpio5 Please note ! is uppercase
- Press
Q
key, a Save configuration prompt appears, then pressY
key
- Now the configuration should be saved and you should be back at the command line interface
- Input
make -j4
to start compilation, it may take some time
-
The following output indicates successful compilation
Linking out/klipper.elf
Creating uf2 file out/klipper.uf2
Enter Flash Mode
Left is the RESET button
, right is the BOOT button
- There are two methods to enter DFU mode
- Method one: With the mainboard completely powered off, hold the BOOT button and connect the data transfer cable to the mainboard and the host computer
- Method two: Connect the data transfer cable to the mainboard and the host computer, hold the BOOT button and press the RST button, then release the RST button and finally release the BOOT button
Confirm Entry into Flash Mode
- Please ensure the host machine can connect to the internet normally.
- Please ensure the data cable connecting the lower-level machine to the host machine has data transfer capabilities.
- After SSH connecting to the host machine, input
lsusb
and press enter. One of the following three situations may occur:- It displays USB devices that have been recognized.
- It prompts that there is no
ls
command, you can execute this command to install it:sudo apt-get install usbutils
- There are no errors, but no other information (this indicates a system problem and needs a system replacement).
- If there is no reaction after entering
lsusb
, this indicates a system problem and we cannot help here; you need to replace with a confirmed normal system. - If the information circled in the following image appears, you can proceed to the next step.
2e8a:0003
belongs to the device you will use this time. Ignore the subsequent prompts as system issues might cause them to display incompletely or not at all.- If not, please check if the data cable is properly connected or if the motherboard is in Katapult mode (formerly CANBOOT).
Proceed to the next step only when you have 2e8a:0003
.
Flash Firmware
-
Short-circuit or long press BOOT, and after connecting to the host machine via Type-C and entering
lsusb
, you will see2e8a:0003
-
Please note that the current RP2040 is in firmware burning mode and can only burn uf2 suffix firmware. Once the firmware is burned, it will disappear.
-
After ejecting
RPI-RP2
, there is no need to short-circuit BOOT or keep pressing the BOOT button. -
Use the following command to burn the firmware to RP2040
cd && cd ~/klipper/
make flash FLASH_DEVICE=2e8a:0003
Confirm Firmware Startup
- If the firmware starts up normally, the LED will light up