Before proceeding it is critical that your CAN network is configured for your printer, failure to setup the network will cause a problem when you try to connect devices :) click here and select your controller for setup instructions!
clone the CanBoot repository to your pi
cd ~/ git clone https://github.com/Arksine/CanBoot
run the following
cd CanBoot make menuconfig
Configure your makefile for the FYSETC SB CAN TH with STM32F072
Exit using ESC or Q, confirm with yes(Y)
Build the firmware
make clean make
Power down SB-CAN-TH board for at least 5s by unplugging the CANBUS cable
Connect your device to your PI via USB
Reconnect the power supply / CAN signal input
lsusb
Bus 001 Device 005: ID 0483:df11 STMicroelectronics STM Device in DFU Mode
Flash the canboot bootloader to the board YOUR DeviceID (0483:df11) may be different CHECK IT! (see step 2)
ERASE AND FLASH THE CANBOOT FIRMWARE
sudo dfu-util -a 0 -D ~/CanBoot/out/canboot.bin --dfuse-address 0x08000000:force:mass-erase:leave -d 0483:df11
NOTE: If you see an error after the above, don’t worry its fine, provided you have the “File Downloaded Sucessfully” and text above
Power down SB-CAN-TH board for at least 5s by unplugging the CANBUS cable
If you haven’t setup your network yet, NOW is your last chance before it becomes a problem, click here, and select your control board for instrutions, then return here and carry on :)
You can now power up the toolhead board by reconnecting the CANBUS cable.
Wait for the device to boot and ensure your CAN0 network is up and you can see the device
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
or
~/CanBoot/scripts/flash_can.py -i can0 -q
You should see something like
"Found canbus_uuid=XXXXXXXXXX, Application: CanBoot"
Assuming the above gave you a UUID you can now flash Klipper to your board via CanBoot… (if not see the troubleshooting section here)
cd ~/klipper make menuconfig
Enable low level configuratation set the following.
Hit Q to exit and select Y to save changes.
make clean make
You can now flash the board
python3 ~/CanBoot/scripts/flash_can.py -i can0 -f ~/klipper/out/klipper.bin -u MYUUID
If all is well you now have a klipper firmware on your SHT.
To verify this you can query the canbus uuid with
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
You should see something like
"Found canbus_uuid=XXXXXXXXXX, Application: Klipper"
1.1 here you go
Enjoy!