0. Système à jour, Klipper à jour et dfu-util installé ( sudo apt-get install dfu-util ) 1. Installation de CanBoot ``` git clone https://github.com/Arksine/CanBoot cd CanBoot make menuconfig [*] 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 make ``` 2. Passer en DFU-mode (JUMPER; Reset + Boot; Relâcher Reset; Relâcher Boot) 3. `lsusb` pour récupérer id de la carte 4. `dfu-util --list` pour vérifier que l'appareil est accessible 5. `sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000:force:mass-erase -D ~/CanBoot/out/canboot.bin` 6. Créer fichier `/etc/network/interfaces.d/can0` avec le contenu suivant : ``` auto can0 iface can0 can static bitrate 1000000 up ifconfig $IFACE txqueuelen 1024 ``` 7. ``` sudo wget https://upyun.pan.zxkxz.cn/shell/can-enable -O /usr/bin/can-enable > /dev/null 2>&1 && sudo chmod +x /usr/bin/can-enable || echo "The operation failed" sudo cat /etc/rc.local | grep "exit 0" > /dev/null || sudo sed -i '$a\exit 0' /etc/rc.local sudo sed -i '/^exit\ 0$/i \can-enable -d can0 -b 1000000 -t 1024' /etc/rc.local ``` 8. Reboot 9. Placer jumpers 120R sur la board, enlever jumpers du 5V USB, alimenter la board et connecter au port CAN 10. Config Klipper pour canboard 11. `make clean && make` 12. `sudo service klipper stop` 13. `~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0` 14. `~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -i can0 -f ~/klipper/out/klipper.bin -u 5b06f23bc9ca` (5b06f23bc9ca is your uuid) 15. `sudo service klipper start` Pour flasher la Manta M8P (identique à ce qu'il il y a plus haut sauf pour la partie klipper cf ci-dessous) cd klipper make clean make menucongfig [*] Enable extra low-level configuration options Micro-controller Architecture (STMicroelectronics STM32) ---> Processor model (STM32G723) ---> Bootloader offset (8KiB bootloader) ---> Clock Reference (25 MHz crystal) ---> Communication interface (CAN bus (on PD0/PD1)) ---> (1000000) CAN bus speed make make flash FLASH_DEVICE=0483:df11