"Deleting" Firmware Loaded by Katapult

As I work through my functional test and manufacturing process for my custom boards, one of the issues I have is leaving the board in a state in which the user can load the latest version of Klipper.

The software stack used in the manufacturing process consists of Katapult which is then used to load Klipper for the functional test. To “erase” the Klipper image used in manufacturing, I have found (with the help of @Arksine) that you can load a four byte file with each byte being set to 0xff that indicates to Katapult that there isn’t any firmware that needs to execute.

The four byte file is here: nada.zip (192 Bytes) And, as I indicated above, it’s only four bytes long. I put the unzipped file into the home folder of my host.

To load the file and “erase” Klipper:

  1. Enable Katapult (ie double click the Reset button on the main controller board)
  2. Get the serial device using:
    ls /dev/serial/by-id
  3. Load the nada.bin file using the standard flashtool.py application:
    python3 ~/katapult/scripts/flashtool.py -f ~/nada.bin -d /dev/serial/by-id/<serial device>
  4. Press Reset on the main controller board and Katapult will be ready to load a new Klipper firmware image.

I’m not really sure if this little trick will help anybody but if you are in the situation where you need to erase a currently installed Klipper firmware image and have Katapult active on power up/Reset then here is how to do it.

5 Likes

@mykepredko

Step two & three; using might get confusing to some who know UUID to CAN bus ID and not a USB ID, you might want to change to <usb_id>

I’ve changed it to “serial device” so the terminology matches what’s used on the Katapult page:

Is this okay?

1 Like

The reply has to be at least 10 chars to post.

Good

1 Like