Octopus Pro Klipper CanBoot Install - WidowMaker-3D/WidowMaker GitHub Wiki

Guide for installing CanBoot on the Octopus Pro (STM32f446).

Download CanBoot and Install pyserial

cd ~
git clone https://github.com/Arksine/CanBoot
pip3 install pyserial

Making CanBoot Bootloader

cd CanBoot
make menuconfig

CanBoot_Settings

Exit using Q or ESC and confirm changes with Y

Build Firmware

make clean
make

Setting Boot Jumper on Octopus Pro and Connect to PI via USB-C

  1. Connect the PI via USB-C
  2. Set Boot Jumper (Yellow arrow)
  3. Double press Reset button (Blue arrow)

Octopus_Pro_Boot_Jumper

Verify the device is in DFU mode using

lsusb

You should see a STMicroelectronics STM Device in DFU mode listed

dfu_mode

Flash CanBoot

We can now flash the CanBoot bootloader

sudo dfu-util -a 0 -D ~/CanBoot/out/canboot.bin --dfuse-address 0x08000000:force:mass-erase:leave -d 0483:df11

Verify the CanBoot usb bootloader is loaded

lsusb

CanBoot_Verify

You can now remove the Boot Jumper.

Make Klipper Firmware

cd klipper
make menuconfig

Klipper_Settings

Note: You can use the default Can bus speed (500000) but make sure it matches with /etc/network/interfaces.d/can0

Exit using Q or ESC and confirm changes with Y

make clean
make

Flash the new firmware via CanBoot

Run

ls /dev/serial/by-id/

ls_dev

Now use the "/dev/serial/by-id/usb-CanBoot_stm32f446xx_" line in the following command to flash your board with the Klipper Firmware.

python3 ~/CanBoot/scripts/flash_can.py -d  /dev/serial/by-id/usb-CanBoot_stm32f446xx_<YOUR_NUMBER>-if00

Klipper_Firmware_Flash

Setting up the CAN0 network

sudo nano /etc/network/interfaces.d/can0

Make sure to use the same bitrate that you used when building the Klipper Firmware!

allow-hotplug can0
iface can0 can static
 bitrate 1000000
 up ifconfig $IFACE txqueuelen 256
 pre-up ip link set can0 type can bitrate 1000000
 pre-up ip link set can0 txqueuelen 256

and press Ctrl+X to save.

Reboot the pi with sudo reboot

Verify the adapter

lsusb

Can_interface_verify

Verify the Node is visible

~/CanBoot/scripts/flash_can.py -i can0 -q

node_self

Now update your Klipper configuration under the [MCU] section with the UUID detected

From

[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_2A0031000B50534E4E313120-if00
restart_method: command 

To

[mcu]
canbus_uuid: <UUID>
⚠️ **GitHub.com Fallback** ⚠️