RS232 Firmware Compilation
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.
- 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 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.make menuconfig
is for compiling the firmware. After execution, the following interface should appear: -
Select Enable extra low-level configuration options and press Enter
-
Go into the menu Micro-controller Architecture and then select STMicroelectronics STM32 and press Enter
-
Go into the menu Processor model, select STM32H723 and press Enter
-
Select Bootloader offset, choose: NO bootloader
-
Select Clock Reference (8 MHz crystal), choose: 25 MHz crystal
-
For Communication interface, choose: Serial (on USART1 PA10/PA9)
-
Select GPIO pins to set at micro-controller startup, input: !PA15 Please note ! is uppercase
-
Press
Q
key, you will see Save configuration, then pressY
key -
Now the configuration should be saved and you are back to the command line interface
-
Input
make -j4
to start compilation, it takes some time -
The compilation is successful if the following output is shown
Linking out/klipper.elf
Creating hex file out/klipper.bin
Enter Flash Mode
Above is the RESET button
, below is the BOOT button
- There are two methods to enter DFU mode
- Method one: With the motherboard completely powered off, hold the BOOT button while connecting the data transfer cable to the motherboard and the host machine
- Method two: Connect the data transfer cable to the motherboard and the host machine, hold the BOOT button, press the RST button, release the RST button, and finally release the BOOT button
Confirm Flash Mode Entry
-
Ensure the host machine can connect to the internet normally.
-
Ensure the data cable connecting the lower-level machine to the host machine has data transmission capabilities.
-
After SSH connecting to the host machine, enter
lsusb
and press enter. One of the following three situations may occur:- Displays USB devices that have been recognized.
- Prompts that there is no
ls
command, you can execute this command to install it:sudo apt-get install usbutils
- No error message, no other information (a system issue requires replacing the system).
-
If there is no reaction after entering
lsusb
, this is a system issue and cannot be resolved here; you need to replace a confirmed normal system. -
If the information circled in the image below appears, you can proceed to the next step.
-
0843:df11
belongs to the device you will use this time. Ignore the subsequent prompts as system issues may cause them to display incompletely or not at all. -
If not, check whether the data cable is properly connected or if the motherboard has entered DFU.
Proceed to the next step only if you have 0843:df11
.
Flash Firmware
- Install the flashing tool
- No need to install the flashing tool for the FLY GUI.
- If you need to install it, please note: The GUI needs to be connected to the internet to install properly.
- If you have already installed it, no need to install again.
sudo apt update
sudo apt install dfu-util -y
- Execute the following command to check if the connection is successful.
lsusb
-
If there is no DFU device, please try to re-enter flashing mode.
-
Due to system version issues, other names may be displayed. If
0483:df11
is shown, it indicates that the flashing mode has been entered.
- Flash the firmware
- Execute the code below to start flashing.
sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000 -D ~/klipper/out/klipper.bin
- If the following content is shown at the arrow as
File downloaded successfully
, the flashing is successful.
After flashing is complete, you need to power off the motherboard completely.
-
Flash Firmware
sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000 -D ~/kliper/out/klipper.bin
-
Flashing is successful if the following content is shown as indicated by the arrow in the image
After flashing, the motherboard needs to be powered off completely.
Confirm Firmware Boot
- If the firmware boots successfully, the LED will light up