Firmware Flash
Updating Manta Klipper firmware remotely

Updating klipper on the Manta remotely

Requirements

This is for use with a working printer that requires the klipper firmware on the Manta to be updated. You must have at least downloaded the CanBoot repo per the initial flashing instructions as we will use one of its scripts to put the Manta in DFU mode over CAN.

Updating Klipper

You will need the canbus ID for your Manta, it can be found in your printer.cfg file under [mcu], write this down, you will need it later in the process.

⚠️

Note that on some boards, like the Octopus Pro v1, entering DFU mode can cause undesired actions (such as powering the heater while in DFU mode). I experienced no issue while updating my Manta M8P V2, but this is noted in the klipper docs, so I'm passing it along.

Make The klipper firmware

Stop the klipper Service (This can be done from in mainsail)

Connect to your printer via SSH

$ cd ~/klipper
$ make menuconfig
Manta M8P V1
[*] Enable extra low-level configuration options
    Micro-controller Architecture (STMicroelectronics STM32)  --->
    Processor model (STM32G0B1)  --->
    Bootloader offset (8KiB bootloader)  --->  
    Clock Reference (8 MHz crystal)  --->
    Communication interface (USB to CAN bus bridge (USB on PA11/PA12))  --->
    CAN bus interface (CAN bus (on PD12/PD13))  --->
    USB ids  --->
(1000000) CAN bus speed
()  GPIO pins to set at micro-controller startup

image-20230319014546632

Manta M8P V2
[*] Enable extra low-level configuration options
    Micro-controller Architecture (STMicroelectronics STM32)  --->
    Processor model (STM32H723)  --->
    Bootloader offset (128KiB bootloader (SKR SE BX v2.0))  --->
    Clock Reference (25 MHz crystal)  --->
    Communication interface (USB to CAN bus bridge (USB on PA11/PA12))  --->
    CAN bus interface (CAN bus (on PD0/PD1))  --->
    USB ids  --->
(1000000) CAN bus speed
()  GPIO pins to set at micro-controller startup (NEW)

image-20231012021820745

Press Q to save and then run make from the terminal:

$ make

Put the Manta in DFU mode via Canboot script

Canboot was recently renamed to Katapult. Depending on your installation you may need to substitute katapult for CanBoot below.

Via SSH:

$ python3 ~/CanBoot/scripts/flashtool.py -i can0 -u <uuid> -r    # replacing <uuid> with the uuid for your Manta

Let's verify that the Manta is in DFU mode:

$ lsusb

image-20230319015826219

There should be a DFU Mode device found. Record its ID, but normally it's 0483:df11.

Flash the Manta

$ make flash FLASH_DEVICE=0483:df11

Restart your printer

In the event the Klipper flash fails and the Manta becomes unresponive, it can be recovered by reflashing the bootloader and then klipper, see the troubleshooting section of the initial flashing guide. The USB_5v jumper on the Manta is not needed if the board is powered from the printer.