Skip to main content

USB to CAN Firmware Flashing

Start Compiling

  • A host computer with the klipper service installed is required Connect via SSH over the network
  • And the device is connected to the host computer
  • Note: Please use a regular host computer, such as Raspberry Pi FLY. If it is a modified host computer (such as a WiFi stick, Redmi, etc.), due to too many issues, we cannot provide technical support
warning
  • Notes on FlyOS-Armbian system and general system
    • Ordinary host computer systems such as Raspberry Pi, FLY are viewed in this category
    • Do not use the ROOT user for any operations on these host computers
    • Please use a normal user for operations
    • To switch users, for FlyOS-Armbian system use the su fly command to switch to a normal user
    • For other systems, use the su <your host computer username> command to switch to a normal user
    su <your host computer 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.

:::

Below is the 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 STMicroelectronics STM32 and press Enter

  • Enter the menu Processor model, select STM32H723 and press Enter

  • Select Bootloader offset, select: 128KiB bootloader

  • Select Clock Reference (8 MHz crystal), select: 25 MHz crystal

  • Select Communication interface, select: USB to CAN bus bridge (USB on PA11/PA12)

  • Press the Q key, and Save configuration appears, then press Y key
  • Now the configuration should be saved and you should return to the command line interface
  • Enter the following command to start compiling, it takes some time
make -j4
  • If the following output appears, the compilation is successful

    Linking out/klipper.elf
    Creating hex file out/klipper.bin

Confirm if Entering Flashing Mode

  • After connecting the mainboard to the host computer with a TypeC data cable, press the reset button twice, and the LED on the mainboard will blink.
Warning
  • If the LED does not blink, reflash the katapult firmware: Flash katapult firmware
  • If the LED does not blink, perform the next step after reflashing the katapult firmware

Search for Devices

  • Now that you have successfully logged into the host computer, you can enter lsusb to search for devices. You may encounter one of the following situations:
    • If entering lsusb prompts that the ls command is not found, you can install the required utility by entering the following command:
      sudo apt-get install usbutils
    • If there is no response after entering lsusb, this is a system issue and cannot be resolved here. You will need to change the system or use a known working system.
    • If information like that shown in the image below appears, please note that this is only a reference. You only need to confirm that 1d50:606f appears:
  • 1d50:606f is the device you will use in this instance.
  • If multiple 1d50:606f devices appear, one must be excluded, as multiple entries may affect subsequent flashing and firmware connection. For example, with FLY MINI PAD, it is recommended to use the onboard UTOC and avoid using other CAN bridges.
  • If the device does not appear, please check whether the data cable is properly connected and whether the correct firmware has been flashed.
Note

You can proceed to search for the CAN ID only when 1d50:606f appears.

Flash Firmware

tip
  • Internet connection is required when installing the flashing plugin. Please ensure your host machine is properly connected to the internet.
  • If already installed, there is no need to install again.

Start Flashing

Warning
  • For non-fly host machines, please execute the code below to install the required dependency packages for firmware flashing! Otherwise, the firmware cannot be flashed!

    cd && git clone https://github.com/Arksine/katapult.git
  • Use the command below to search for your device ID. The ID shown in the figure below should appear (Note: The ID shown in the figure is for reference only; each motherboard has a unique ID).

    ls /dev/serial/by-id/*
  • Use the code below to flash the firmware. Please ensure the firmware has already been compiled, and replace <你的主板ID> with the ID obtained in the previous step.

~/klippy-env/bin/python ~/katapult/scripts/flashtool.py -d /dev/serial/by-id/<你的主板ID>
  • Reference image is shown below:

  • Reference after flashing is completed:

Firmware Update

  • Use the following command to search for your motherboard ID. The ID shown in the figure below should appear (Note: The ID shown in the figure is for reference only; each motherboard has a unique ID).

    ls /dev/serial/by-id/*
Note

The ID /dev/serial/by-id/usb-katapult_rp2040_E662549553642032-if00 in the figure below is the motherboard ID.

  • After compiling the latest firmware, use the command below to update the USB firmware. Please replace <你的主板ID> with the ID obtained in the previous step.

    cd ~/klipper/ && make flash FLASH_DEVICE=<你的主板ID>

Recovery Method for Incorrect Firmware

  • Power off the motherboard, then power it on again and double-press the reset button quickly to re-enter flashing mode.
  • Alternatively, use Windows/host machine to re-flash the Katapult firmware Flash Katapult Firmware
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...