Flash CanBoot and Klipper to EBB

Summary & FAQ

What are the advantages of CanBoot?

It allows flash firmware by canbus directly, no need to plug Type-c cable anymore after you done this.

Note

Make sure you have the lastest klipper version. In some test the default version of CB1 would cause out of control heater issue.

Configure CAN Interface with U2C

Connect U2C with a USB cable.

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

Input these lines.

auto can0
iface can0 can static
    bitrate 500000
    up ifconfig $IFACE txqueuelen 1024

If you are using USB-CANBUS bridge, use this instead.

allow-hotplug can0
iface can0 can static
    bitrate 500000
    up ifconfig $IFACE txqueuelen 1024

Save after modification (Ctrl + S) and exit (Ctrl + X)

Enter sudo reboot to restart.

With this command you can check if configure CAN insterface right, it should show can0

ip addr

Flash CanBoot

cd ~
git clone https://github.com/Arksine/CanBoot
cd CanBoot
make menuconfig

img

Set menuconfig options the same as this pic.

image-20221003044752723

Press Q and save it, then run make

img

Connect EBB via type-c, and plug the VBUS jumper

img

Press and hold BOOT button, then click the RST button to enter DFU mode

sudo lsusb

img

there should be a STM32 Device in DFU Mode if right.

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

You may need to replace 0483:df11 with yours.

img

If it shows like this, then you have flashed CanBoot successful.

First Time Flash Klipper by USB

Only needed when configuring for the first time

cd ~/klipper
make menuconfig

set the menuconfig same as this pic

img

Press Q and save it, then run make

The same as step 1, connect USB cable and plug VBUS jumper .

Press and hold BOOT button, then click the RST button to enter DFU mode

sudo lsusb

img

There should be a STM32 Device in DFU Mode if right.

Run this command to flash klipper.

sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08002000 -D out/klipper.bin

Output should like this

sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08002000 -D out/klipper.bin
....
Device returned transfer size 1024
DfuSe interface name: "Internal Flash   "
Downloading to address = 0x08002000, size = 26336
Download    [=========================] 100%        26336 bytes
Download done.

Flash Klipper by CanBoot

At first you need to remove the VBUS jumper and plug it to the 120R resistance.

img

Then plug the 4P MX3.0 connector.

Query Canbus ID:

cd ~/klipper
python3 lib/canboot/flash_can.py -q

If it have no canbus id, double click RST button to enter BootLoader mode.

img

make menuconfig

press Q and save it

make

img

Flash klipper firmware to EBB.

python3 lib/canboot/flash_can.py -i can0 -f ./out/klipper.bin -u 110a62ed1c3c

img