Basic Information:
Printer Model: Voron 0
MCU / Printerboard: SKR-Pico and EBB36
USB to CAN bus bridge using the CAN Transceiver SN65HVD230
After trying to identify the cause of an error:
Unable to read tmc uart ‘stepper_x’ register IFCNT
(See: [Possible bug in recent commit - #23 by mark.dunn]),
I thought I should document the new process of installing and even more importantly re-installing the CAN bus firmware (Katapult and Klipper) into the SKR_Pico and the EBB36 and post it here.
NOTE - Katapult is not required for my CAN bus solution, both the SKR-Pico and the EBB36 can be installed with Klipper directly. But I have a Voron 0.1 with some mods which still has the fixed hat, and fixed rear panel. This makes pressing buttons on the SKR-Pico and EBB36 a pain. The Katapult firmware (was CanBoot) allows me to upgrade the firmware without pulling the machine apart.
I have tried to include all the linux commands required to do the task AND to keep track of what is happening at every step. Please report any errors or spelling mistakes to me.
Installing the firmware on the SKR-Pico
Installing 1st Katapult (katapult.bin)
git clone https://github.com/Arksine/katapult.git
cd katapult
make distclean
make clean
Using default symbol values (no '/home/mark/katapult/.config')
Configuration saved to '/home/mark/katapult/.config'
Creating symbolic link out/board
make menuconfig
Katapult Configuration v0.0.1-57-gabd1545
Micro-controller Architecture (Raspberry Pi RP2040) --->
Flash chip (W25Q080 with CLKDIV 2) --->
Build Katapult deployment application (Do not build) --->
Communication interface (USB) --->
USB ids --->
() GPIO pins to set on bootloader entry
[*] Support bootloader entry on rapid double click of reset button
[ ] Enable bootloader entry on button (or gpio) state
[ ] Enable Status LED
.
Creating symbolic link out/board
Loaded configuration '/home/mark/katapult/.config'
Configuration saved to '/home/mark/katapult/.config'
make -j4
Creating symbolic link out/board
Building out/autoconf.h
Building out/lib/rp2040/elf2uf2/elf2uf2
Compiling out/src/sched.o
Compiling out/src/bootentry.o
Compiling out/src/command.o
Compiling out/src/flashcmd.o
Compiling out/src/initial_pins.o
Compiling out/src/rp2040/armcm_canboot.o
Compiling out/src/rp2040/main.o
Compiling out/src/rp2040/gpio.o
Compiling out/src/rp2040/timer.o
Compiling out/src/rp2040/flash.o
Compiling out/src/../lib/rp2040/pico/flash/hw_flash.o
Compiling out/src/generic/armcm_irq.o
Compiling out/src/generic/crc16_ccitt.o
Compiling out/src/rp2040/can.o
Compiling out/src/rp2040/chipid.o
Compiling out/src/../lib/can2040/can2040.o
Compiling out/src/generic/canserial.o
Compiling out/src/generic/canbus.o
Compiling out/src/../lib/fast-hash/fasthash.o
Building rp2040 stage2 out/stage2.o
Preprocessing out/src/rp2040/rp2040_link.ld
Building out/compile_time_request.o
Linking out/katapult.elf
Creating bin file out/katapult.bin
Creating uf2 file out/katapult.uf2
Creating legacy uf2 file out/canboot.uf2
Creating legacy binary out/canboot.bin
Physical Actions:
Install the boot jumper.
Press the reset button.
sudo mount /dev/sda1 /mnt
sudo cp out/katapult.uf2 /mnt
sudo umount /mnt
Physical Actions:
Remove the boot jumper.
Press the reset button.
lsusb
Bus 001 Device 005: ID 1d50:6177 OpenMoko, Inc. rp2040
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
ls /dev/serial/by-id
usb-katapult_4550357129118BE8-if00
Installing 2nd katapult (deployer.bin)
make distclean
make clean
Using default symbol values (no '/home/mark/katapult/.config')
Configuration saved to '/home/mark/katapult/.config'
make menuconfig
Katapult Configuration v0.0.1-57-gabd1545
Micro-controller Architecture (Raspberry Pi RP2040) --->
Flash chip (W25Q080 with CLKDIV 2) --->
Build Katapult deployment application (16KiB bootloader) --->
Communication interface (USB) --->
USB ids --->
() GPIO pins to set on bootloader entry
[*] Support bootloader entry on rapid double click of reset button
[ ] Enable bootloader entry on button (or gpio) state
[ ] Enable Status LED
.
Creating symbolic link out/board
Loaded configuration '/home/mark/katapult/.config'
Configuration saved to '/home/mark/katapult/.config'
make -j4
Creating symbolic link out/board
Building out/autoconf.h
Building out/lib/rp2040/elf2uf2/elf2uf2
Compiling out/src/sched.o
Compiling out/src/bootentry.o
Compiling out/src/command.o
Compiling out/src/flashcmd.o
Compiling out/src/initial_pins.o
Compiling out/src/rp2040/armcm_canboot.o
Compiling out/src/rp2040/main.o
Compiling out/src/rp2040/gpio.o
Compiling out/src/rp2040/timer.o
Compiling out/src/rp2040/flash.o
Compiling out/src/../lib/rp2040/pico/flash/hw_flash.o
Compiling out/src/generic/armcm_irq.o
Compiling out/src/generic/crc16_ccitt.o
Compiling out/src/rp2040/usbserial.o
Compiling out/src/generic/usb_cdc.o
Compiling out/src/rp2040/chipid.o
Building rp2040 stage2 out/stage2.o
Preprocessing out/src/rp2040/rp2040_link.ld
Compiling out/src/deployer.o
Compiling out/src/generic/armcm_boot.o
Compiling out/src/generic/armcm_reset.o
Preprocessing out/src/generic/armcm_deployer.ld
Building out/compile_time_request.o
Building out/deployer_ctr.o
Linking out/katapult.elf
Creating bin file out/katapult.bin
Creating uf2 file out/katapult.uf2
Creating legacy uf2 file out/canboot.uf2
Creating legacy binary out/canboot.bin
Compiling out/katapult_payload.o
Linking out/deployer.elf
Creating hex file out/deployer.bin
There is no klipper at this point, so no canbus:
ls /dev/serial/by-id
usb-katapult_4550357129118BE8-if00
~/katapult/scripts/flashtool.py -d /dev/serial/by-id/usb-katapult_4550357129118BE8-if00 -f ~/katapult/out/deployer.bin
Attempting to connect to bootloader
Katapult Connected
Protocol Version: 1.0.0
Block Size: 64 bytes
Application Start: 0x10004000
MCU type: rp2040
Flashing '/home/mark/katapult/out/deployer.bin'...
[##################################################]
Write complete: 26 pages
Verifying (block count = 103)...
[#################################################]
Verification Complete: SHA = 3A9EC72201DD20AD05B8EDB3E3A8D09A042F6E27
Flash Success
Installing 1st klipper
git clone https://github.com/Klipper3d/klipper.git
cd klipper
make distclean
make clean
Using default symbol values (no '/home/mark/klipper/.config')
Configuration saved to '/home/mark/klipper/.config'
Creating symbolic link out/board
make menuconfig
Klipper Firmware Configuration
[*] Enable extra low-level configuration options
Micro-controller Architecture (Raspberry Pi RP2040) --->
Bootloader offset (16KiB bootloader) --->
Communication interface (USB to CAN bus bridge) --->
(1) CAN RX gpio number
(0) CAN TX gpio number
USB ids --->
(1000000) CAN bus speed
() GPIO pins to set at micro-controller startup
.
Creating symbolic link out/board
Loaded configuration '/home/mark/klipper/.config'
Configuration saved to '/home/mark/klipper/.config'
make -j4
Creating symbolic link out/board
Building out/autoconf.h
Compiling out/src/sched.o
Compiling out/src/command.o
Compiling out/src/basecmd.o
Compiling out/src/debugcmds.o
Compiling out/src/initial_pins.o
Compiling out/src/gpiocmds.o
Compiling out/src/stepper.o
Compiling out/src/endstop.o
Compiling out/src/trsync.o
Compiling out/src/adccmds.o
Compiling out/src/spicmds.o
Compiling out/src/i2ccmds.o
Compiling out/src/pwmcmds.o
Compiling out/src/buttons.o
Compiling out/src/tmcuart.o
Compiling out/src/neopixel.o
Compiling out/src/pulse_counter.o
Compiling out/src/lcd_st7920.o
Compiling out/src/lcd_hd44780.o
Compiling out/src/spi_software.o
Compiling out/src/i2c_software.o
Compiling out/src/thermocouple.o
Compiling out/src/sensor_adxl345.o
Compiling out/src/sensor_angle.o
Compiling out/src/sensor_mpu9250.o
Compiling out/src/rp2040/main.o
Compiling out/src/rp2040/watchdog.o
Compiling out/src/rp2040/gpio.o
Compiling out/src/rp2040/adc.o
Compiling out/src/rp2040/timer.o
Compiling out/src/rp2040/bootrom.o
Compiling out/src/generic/armcm_boot.o
Compiling out/src/generic/armcm_irq.o
Compiling out/src/generic/armcm_reset.o
Compiling out/src/generic/timer_irq.o
Compiling out/src/generic/crc16_ccitt.o
Compiling out/src/rp2040/can.o
Compiling out/src/rp2040/chipid.o
Compiling out/src/../lib/can2040/can2040.o
Compiling out/src/generic/canserial.o
Compiling out/src/generic/usb_canbus.o
Compiling out/src/../lib/fast-hash/fasthash.o
Compiling out/src/rp2040/usbserial.o
Compiling out/src/rp2040/hard_pwm.o
Compiling out/src/rp2040/spi.o
Compiling out/src/rp2040/i2c.o
Preprocessing out/src/generic/armcm_link.ld
Building out/compile_time_request.o
Version: v0.11.0-257-ged66982b
Linking out/klipper.elf
Creating bin file out/klipper.bin
~/katapult/scripts/flashtool.py -d /dev/serial/by-id/usb-katapult_4550357129118BE8-if00 -f ~/klipper/out/klipper.bin
Attempting to connect to bootloader
Katapult Connected
Protocol Version: 1.0.0
Block Size: 64 bytes
Application Start: 0x10004000
MCU type: rp2040
Flashing '/home/mark/klipper/out/klipper.bin'...
[##################################################]
Write complete: 129 pages
Verifying (block count = 515)...
[##################################################]
Verification Complete: SHA = D83CB43402EBD825B2EBDEC534D7EF4D1BA61E6D
Flash Success
At this point the serial port was disabled:
ls /dev/serial/by-id
ls: cannot access '/dev/serial/by-id': No such file or directory
And the canbus was enabled:
ip link show
…
5: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 128
link/can
~/katapult/scripts/flashtool.py -q -v
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Detected UUID: fc7c3907fd17, Application: Klipper
Query Complete
Installing 2nd Klipper
Unfortunately, I cannot deploy this with katapult over USB as klipper is now in control.
But if I leave the klipper service running then I can see the can UUID:
~/katapult/scripts/flashtool.py -q -v
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Detected UUID: fc7c3907fd17, Application: Klipper
lsusb
Bus 001 Device 009: ID 1d50:606f OpenMoko, Inc. Geschwister Schneider CAN adapter
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
We should flash the second Katapult here (deployer.bin) because trying to use klipper’s ‘USB to can bridge’ to flash another klipper crashes the original klipper (of course).
But both methods leave Katapult in control:
~/katapult/scripts/flashtool.py -i can0 -u fc7c3907fd17 -f ~/klipper/out/klipper.bin
Sending bootloader jump command...
Resetting all bootloader node IDs...
Checking for Katapult nodes...
ERROR:root:Flash Error
Traceback (most recent call last):
File "/home/mark/katapult/scripts/flashtool.py", line 628, in main
loop.run_until_complete(sock.run(intf, uuid, fpath, req_only))
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/mark/katapult/scripts/flashtool.py", line 474, in run
raise FlashCanError(
FlashCanError: Unable to find node matching UUID: fc7c3907fd17
lsusb
Bus 001 Device 008: ID 1d50:6177 OpenMoko, Inc. rp2040
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
ls /dev/serial/by-id
usb-katapult_4550357129118BE8-if00
~/katapult/scripts/flashtool.py -q -v
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Detected UUID: fc7c3907fd17, Application: Klipper
Query Complete
~/katapult/scripts/flashtool.py -d /dev/serial/by-id/usb-katapult_4550357129118BE8-if00 -f ~/klipper/out/klipper.bin
Attempting to connect to bootloader
Katapult Connected
Protocol Version: 1.0.0
Block Size: 64 bytes
Application Start: 0x10004000
MCU type: rp2040
Flashing '/home/mark/klipper/out/klipper.bin'...
[##################################################]
Write complete: 129 pages
Verifying (block count = 515)...
[##################################################]
Verification Complete: SHA = D83CB43402EBD825B2EBDEC534D7EF4D1BA61E6D
Flash Success
Installing the firmware on the EBB36
Installing 1st Katapult (katapult.bin)
cd katapult
make distclean
make clean
Using default symbol values (no '/home/mark/katapult/.config')
Configuration saved to '/home/mark/katapult/.config'
Creating symbolic link out/board
make menuconfig
Katapult Configuration v0.0.1-57-gabd1545
Micro-controller Architecture (STMicroelectronics STM32) --->
Processor model (STM32G0B1) --->
Build Katapult deployment application (Do not build) --->
Clock Reference (8 MHz crystal) --->
Communication interface (CAN bus (on PB0/PB1)) --->
Application start offset (8KiB offset) --->
(1000000) CAN bus speed
() GPIO pins to set on bootloader entry
[*] Support bootloader entry on rapid double click of reset button
[ ] Enable bootloader entry on button (or gpio) state
[ ] Enable Status LED
Creating symbolic link out/board
Loaded configuration '/home/mark/katapult/.config'
Configuration saved to '/home/mark/katapult/.config'
make -j4
Creating symbolic link out/board
Building out/autoconf.h
Compiling out/src/sched.o
Compiling out/src/bootentry.o
Compiling out/src/command.o
Compiling out/src/flashcmd.o
Compiling out/src/initial_pins.o
Compiling out/src/generic/armcm_canboot.o
Compiling out/src/stm32/gpio.o
Compiling out/src/stm32/flash.o
Compiling out/src/stm32/clockline.o
Compiling out/src/stm32/dfu_reboot.o
Compiling out/src/generic/armcm_irq.o
Compiling out/src/generic/crc16_ccitt.o
Compiling out/src/stm32/stm32f0_timer.o
Compiling out/src/stm32/stm32g0.o
Compiling out/src/stm32/gpioperiph.o
Compiling out/src/generic/canserial.o
Compiling out/src/../lib/fast-hash/fasthash.o
Compiling out/src/stm32/fdcan.o
Compiling out/src/generic/canbus.o
Compiling out/src/stm32/chipid.o
Preprocessing out/src/generic/armcm_link.ld
Building out/compile_time_request.o
Linking out/katapult.elf
Creating bin file out/katapult.bin
Creating legacy binary out/canboot.bin
lsusb
Bus 001 Device 003: ID 1d50:606f OpenMoko, Inc. Geschwister Schneider CAN adapter
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Physical Actions:
Connect a USB cable from the Raspberry Pi to the EBB36
Press and hold boot button
Press rst button
Release the boot button
lsusb
Bus 001 Device 003: ID 1d50:606f OpenMoko, Inc. Geschwister Schneider CAN adapter
Bus 001 Device 005: ID 0483:df11 STMicroelectronics STM Device in DFU Mode
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
sudo dfu-util -a 0 -D ~/katapult/out/katapult.bin --dfuse-address 0x08000000:force:mass-erase:leave -d 0483:df11
dfu-util 0.11-dev
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0483:df11
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash "
Performing mass erase, this can take a moment
Downloading element to address = 0x08000000, size = 4244
Erase [=========================] 100% 4244 bytes
Erase done.
Download [=========================] 100% 4244 bytes
Download done.
File downloaded successfully
Submitting leave request...
dfu-util: Error during download get_status: -9 (LIBUSB_ERROR_PIPE)
lsusb
Bus 001 Device 003: ID 1d50:606f OpenMoko, Inc. Geschwister Schneider CAN adapter
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
~/katapult/scripts/flashtool.py -q -v
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Detected UUID: c80a2d7c1c33, Application: Katapult
Query Complete
Physical action:
Remove the USB cable from the Raspberry Pi to the EBB36
Installing 2nd katapult (deployer.bin)
make menuconfig
Katapult Configuration v0.0.1-57-gabd1545
Micro-controller Architecture (STMicroelectronics STM32) --->
Processor model (STM32G0B1) --->
Build Katapult deployment application (8KiB bootloader) --->
Clock Reference (8 MHz crystal) --->
Communication interface (CAN bus (on PB0/PB1)) --->
Application start offset (8KiB offset) --->
(1000000) CAN bus speed
() GPIO pins to set on bootloader entry
[*] Support bootloader entry on rapid double click of reset button
[ ] Enable bootloader entry on button (or gpio) state
[ ] Enable Status LED
Loaded configuration '/home/mark/katapult/.config'
Configuration saved to '/home/mark/katapult/.config'
make -j4
Creating symbolic link out/board
Building out/autoconf.h
Compiling out/src/sched.o
Compiling out/src/bootentry.o
Compiling out/src/command.o
Compiling out/src/flashcmd.o
Compiling out/src/initial_pins.o
Compiling out/src/generic/armcm_canboot.o
Compiling out/src/stm32/gpio.o
Compiling out/src/stm32/flash.o
Compiling out/src/stm32/clockline.o
Compiling out/src/stm32/dfu_reboot.o
Compiling out/src/generic/armcm_irq.o
Compiling out/src/generic/crc16_ccitt.o
Compiling out/src/stm32/stm32f0_timer.o
Compiling out/src/stm32/stm32g0.o
Compiling out/src/stm32/gpioperiph.o
Compiling out/src/generic/canserial.o
Compiling out/src/../lib/fast-hash/fasthash.o
Compiling out/src/stm32/fdcan.o
Compiling out/src/generic/canbus.o
Compiling out/src/stm32/chipid.o
Preprocessing out/src/generic/armcm_link.ld
Compiling out/src/deployer.o
Compiling out/src/generic/armcm_boot.o
Compiling out/src/generic/armcm_reset.o
Preprocessing out/src/generic/armcm_deployer.ld
Building out/compile_time_request.o
Linking out/katapult.elf
Building out/deployer_ctr.o
Creating bin file out/katapult.bin
Creating legacy binary out/canboot.bin
Compiling out/katapult_payload.o
Linking out/deployer.elf
Creating hex file out/deployer.bin
~/katapult/scripts/flashtool.py -i can0 -u c80a2d7c1c33 -f ~/katapult/out/deployer.bin
Sending bootloader jump command...
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Detected UUID: c80a2d7c1c33, Application: Katapult
Attempting to connect to bootloader
Katapult Connected
Protocol Version: 1.0.0
Block Size: 64 bytes
Application Start: 0x8002000
MCU type: stm32g0b1xx
Verifying canbus connection
Flashing '/home/mark/katapult/out/deployer.bin'...
[##################################################]
Write complete: 3 pages
Verifying (block count = 87)...
[#################################################]
Verification Complete: SHA = C7416740E377A958D87E1C002DD37362CE1BAB7E
Flash Success
lsusb
Bus 001 Device 003: ID 1d50:606f OpenMoko, Inc. Geschwister Schneider CAN adapter
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
~/katapult/scripts/flashtool.py -q -v
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Detected UUID: c80a2d7c1c33, Application: Katapult
Query Complete
Install 1st Klipper
cd klipper
make distclean
Using default symbol values (no '/home/mark/klipper/.config')
Configuration saved to '/home/mark/klipper/.config'
Creating symbolic link out/board
make clean
Using default symbol values (no '/home/mark/klipper/.config')
Configuration saved to '/home/mark/klipper/.config'
Creating symbolic link out/board
make menuconfig
Klipper Firmware Configuration
[*] 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 (CAN bus (on PB0/PB1)) --->
(1000000) CAN bus speed
() GPIO pins to set at micro-controller startup
Creating symbolic link out/board
Loaded configuration '/home/mark/klipper/.config'
Configuration saved to '/home/mark/klipper/.config'
make -j4
Building out/autoconf.h
Compiling out/src/sched.o
Compiling out/src/command.o
Compiling out/src/basecmd.o
Compiling out/src/debugcmds.o
Compiling out/src/initial_pins.o
Compiling out/src/gpiocmds.o
Compiling out/src/stepper.o
Compiling out/src/endstop.o
Compiling out/src/trsync.o
Compiling out/src/adccmds.o
Compiling out/src/spicmds.o
Compiling out/src/i2ccmds.o
Compiling out/src/pwmcmds.o
Compiling out/src/buttons.o
Compiling out/src/tmcuart.o
Compiling out/src/neopixel.o
Compiling out/src/pulse_counter.o
Compiling out/src/lcd_st7920.o
Compiling out/src/lcd_hd44780.o
Compiling out/src/spi_software.o
Compiling out/src/i2c_software.o
Compiling out/src/thermocouple.o
Compiling out/src/sensor_adxl345.o
Compiling out/src/sensor_angle.o
Compiling out/src/sensor_mpu9250.o
Compiling out/src/stm32/watchdog.o
Compiling out/src/stm32/gpio.o
Compiling out/src/stm32/clockline.o
Compiling out/src/stm32/dfu_reboot.o
Compiling out/src/generic/crc16_ccitt.o
Compiling out/src/generic/armcm_boot.o
Compiling out/src/generic/armcm_irq.o
Compiling out/src/generic/armcm_reset.o
Compiling out/src/generic/timer_irq.o
Compiling out/src/stm32/stm32f0_timer.o
Compiling out/src/stm32/stm32g0.o
Compiling out/src/stm32/gpioperiph.o
Compiling out/src/stm32/stm32f0_adc.o
Compiling out/src/stm32/stm32f0_i2c.o
Compiling out/src/stm32/spi.o
Compiling out/src/generic/canserial.o
Compiling out/src/../lib/fast-hash/fasthash.o
Compiling out/src/stm32/fdcan.o
Compiling out/src/generic/canbus.o
Compiling out/src/stm32/chipid.o
Compiling out/src/stm32/hard_pwm.o
Preprocessing out/src/generic/armcm_link.ld
Building out/compile_time_request.o
Version: v0.11.0-257-ged66982b
Linking out/klipper.elf
Creating hex file out/klipper.bin
~/katapult/scripts/flashtool.py -i can0 -u c80a2d7c1c33 -f ~/klipper/out/klipper.bin
Sending bootloader jump command...
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Detected UUID: c80a2d7c1c33, Application: Katapult
Attempting to connect to bootloader
Katapult Connected
Protocol Version: 1.0.0
Block Size: 64 bytes
Application Start: 0x8002000
MCU type: stm32g0b1xx
Verifying canbus connection
Flashing '/home/mark/klipper/out/klipper.bin'...
[##################################################]
Write complete: 14 pages
Verifying (block count = 434)...
[##################################################]
Verification Complete: SHA = 1593139EB61AA40E0BD9DDD34D207D42008D86FF
Flash Success
lsusb
Bus 001 Device 003: ID 1d50:606f OpenMoko, Inc. Geschwister Schneider CAN adapter
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
~/katapult/scripts/flashtool.py -q -v
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Detected UUID: c80a2d7c1c33, Application: Klipper
Query Complete
Installing 2nd klipper
First reinstall katapult 2 (deployer.bin) to gain access to katapult.
~/katapult/scripts/flashtool.py -i can0 -u c80a2d7c1c33 -f ~/katapult/out/deployer.bin
Sending bootloader jump command...
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Detected UUID: c80a2d7c1c33, Application: Katapult
Attempting to connect to bootloader
Katapult Connected
Protocol Version: 1.0.0
Block Size: 64 bytes
Application Start: 0x8002000
MCU type: stm32g0b1xx
Verifying canbus connection
Flashing '/home/mark/katapult/out/deployer.bin'...
[##################################################]
Write complete: 3 pages
Verifying (block count = 87)...
[#################################################]
Verification Complete: SHA = C7416740E377A958D87E1C002DD37362CE1BAB7E
Flash Success
lsusb
Bus 001 Device 006: ID 1d50:606f OpenMoko, Inc. Geschwister Schneider CAN adapter
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
~/katapult/scripts/flashtool.py -q -v
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Detected UUID: c80a2d7c1c33, Application: Katapult
Query Complete
~/katapult/scripts/flashtool.py -i can0 -u c80a2d7c1c33 -f ~/klipper/out/klipper.bin
Sending bootloader jump command...
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Detected UUID: c80a2d7c1c33, Application: Katapult
Attempting to connect to bootloader
Katapult Connected
Protocol Version: 1.0.0
Block Size: 64 bytes
Application Start: 0x8002000
MCU type: stm32g0b1xx
Verifying canbus connection
Flashing '/home/mark/klipper/out/klipper.bin'...
[##################################################]
Write complete: 14 pages
Verifying (block count = 434)...
[##################################################]
Verification Complete: SHA = 1593139EB61AA40E0BD9DDD34D207D42008D86FF
Flash Success
When the System is working
When the system is working, determining the can_uuids can be difficult:
lsusb
Bus 001 Device 006: ID 1d50:606f OpenMoko, Inc. Geschwister Schneider CAN adapter
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
~/katapult/scripts/flashtool.py -q -v
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Query Complete
Even stopping the klipper service does not work:
service klipper stop
~/katapult/scripts/flashtool.py -q -v
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Query Complete
service klipper start
But, if we comment out the canbus_uuids in printer.cfg :
[mcu]
#canbus_uuid: fc7c3907fd17
[mcu EBB36]
#canbus_uuid: c80a2d7c1c33
Then press “SAVE and RESTART” we get the following message in mainsail:
Option 'serial' in section 'mcu' must be specified
Once the underlying issue is corrected, use the "RESTART"
command to reload the config and restart the host software.
Printer is halted.
My guess here is that the devices are no longer in use, and therefore can now be queried.
lsusb
Bus 001 Device 022: ID 1d50:606f OpenMoko, Inc. Geschwister Schneider CAN adapter
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether e4:5f:01:ec:12:c2 brd ff:ff:ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DORMANT group default qlen 1000
link/ether e4:5f:01:ec:12:c5 brd ff:ff:ff:ff:ff:ff
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
link/ether 02:42:9a:b3:3d:5c brd ff:ff:ff:ff:ff:ff
22: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 128
link/can
~/katapult/scripts/flashtool.py -q -v
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Detected UUID: fc7c3907fd17, Application: Klipper
Detected UUID: c80a2d7c1c33, Application: Klipper
Query Complete