Skip to main content

RS232 Firmware Compilation

Start Compilation

  • A host computer with the klipper service installed Connect via SSH over network
  • And the device should be properly connected to the host computer
  • Note: Please use a standard host computer, such as Raspberry Pi, FLY board, etc. If it is a modified host computer (e.g., WiFi dongle, Redmi devices), we cannot provide technical support due to numerous issues with such hosts
warning
  • Applies to standard host computers running systems like Raspberry Pi, FLY board, etc.
  • Do not use the ROOT user for any operations on such hosts
  • Please perform operations using a regular user account
  • To switch users, for the FlyOS-Armbian system, please use the command su fly to switch to the regular user
  • For other systems, use the command su <your host username> to switch to the regular user
su <your host username>

::: tip

  • Please ensure that the host machine can connect to the network normally.
  • Before compiling the firmware, use SSH to log in to the host machine via the network.
  • Do not use a serial port tool to log in to the host machine.

:::

Klipper Firmware Compilation and Configuration Page Operation Instructions

::: tip

Please make sure that the keyboard input method is in half-width mode, i.e., English mode.

:::

  1. The key (up arrow) and (down arrow) on the keyboard are used to move the cursor up and down to select menu items.
  2. The confirm key Enter or spacebar Space is used to check the menu or enter a sub-menu.
  3. The exit key ESC is used to return to the previous menu.
  4. The Q key is used to exit the Klipper firmware configuration page.
  5. When exiting the Klipper firmware configuration page and there is a prompt, press the Y key to save the configuration file.

::: warning

If there are fewer options in the configuration page, please first check [ ] Enable extra low-level configuration options to display some hidden options.

:::

Here's how to compile the firmware:

  • After connecting via SSH, enter the following command and press Enter:

    cd ~/klipper && rm -rf ~/klipper/.config && rm -rf ~/klipper/out && make menuconfig
  • The part rm -rf ~/klipper/.config && rm -rf ~/klipper/out deletes previous compilation data and firmware.

  • make menuconfig is for compiling the firmware. After executing, the following interface should appear:

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

  • Go to the menu Micro-controller Architecture and select STMicroelectronics STM32, then press Enter.

  • Enter 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.

  • Communication interface, select: Serial (on USART1 PA10/PA9).

  • For GPIO pins to set at micro-controller startup, enter: !PA15 Please note the ! is uppercase
  • Press the Q key, when Save configuration appears, then press the Y key
  • The configuration should now be saved and you should be back at the command line interface
  • Enter the command below to start compilation. It will take some time.
make -j4
  • Compilation is successful if the following content is output at the end.
  • Due to Klipper version differences, as long as out/klipper.bin appears, it indicates success.
    Linking out/klipper.elf
    Creating bin file out/klipper.bin

Enter Flashing Mode

tip

The upper button is the RESET button, the lower button is the BOOT button.

  • There are two methods to enter DFU mode.
  • First method: With the board completely powered off, press and hold the BOOT button, then connect a data cable (capable of data transfer) between the board and the host computer.
  • Second method: With a data cable (capable of data transfer) already connected between the board and your host computer, press and hold the BOOT button, then press the RST button, release the RST button, and finally release the BOOT button.

Verify Entry into Flashing Mode

  • Make sure the host computer can connect to the internet normally

  • Make sure the data cable connecting the lower machine to the host computer has data transmission function

  • After SSH connects to the host computer, enter lsusb and press Enter. The following three situations may appear

    • Displays the USB devices that have been identified
    • Prompts that there is no ls command, you can execute this command to install
      sudo apt-get install usbutils
    • No error message, no other information (system issue requires changing the system)
  • After entering lsusb, there is no response. This is a system issue, and we cannot do anything about it. You need to replace it with a confirmed normal system

  • If the information circled in the picture below appears, you can proceed to the next step

  • 0843:df11 belongs to the device you need to use this time. The following prompts you don't need to care about, because system issues may cause it to display incompletely or not display at all

  • If not, please check by yourself whether the data cable is connected properly or whether the motherboard has entered DFU

Notes

Proceed to the next step only when there is 0483:df11

Flash the Firmware

  1. Install the burning tool
  • No need to execute the installation of the burning tool for the FLY upper computer
  • If you need to install, please note: The upper computer needs to be able to access the internet to install normally
  • If already installed, no need to install
sudo apt update
sudo apt install dfu-util -y
  1. Execute the following command to check if the connection is successful.
lsusb
  • If there is no DFU device, please try to re-enter burning mode

  • Due to system version issues, it may display other names. If 0483:df11 is shown, it indicates entering burning mode

  1. Burn the firmware
  • Execute the code below to start burning
sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000 -D ~/klipper/out/klipper.bin
  1. If the content shown at the arrow in the following image is File downloaded successfully, then the burning is successful
tip

After burning, the main board needs to be completely powered off once.

  1. Flash the firmware

    sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000 -D ~/kliper/out/klipper.bin
  2. If the content shown by the arrow in the image below, File downloaded successfully, appears, then the flashing was successful.

tip

After flashing is complete, you need to completely power off the board once.

Verify Firmware Startup

  • If the firmware starts normally, the LED will light up.
Loading...
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
Loading...