Octopus429KlipperUpdate - visilya/voron_v2.4 GitHub Wiki
For updating klipper on Octopus 429 in easiest way, you should do simple steps:
- Connect Octopus and Raspberry Pi (I use RP4, you should change it corresponding to your board):
Raspberry Pi 4 | Octopus Pro 429 |
---|---|
GND | GND |
GPIO 21 | BOOT0 |
GPIO 20 | RST |
Octopus pins
Raspberry Pi 4 pins
2. Create gpio.sh (copy and execute in bash)
cat > ~/gpio.sh <<EOF
# usage:
# >sudo sh gpio.sh <action> <pin> <value>
# reading example:
# >sudo sh gpio.sh read 1
# >0
# writing example:
# >sudo sh gpio.sh write 3 1
#!/bin/bash
#assign parameters
action=\$1
pin=\$2
value=\$3
#create gpio instance
echo \$pin > /sys/class/gpio/export
if [ \$action = "read" ];then
#assign direction
echo in > /sys/class/gpio/gpio\$pin/direction
#read gpio value
cat /sys/class/gpio/gpio\$pin/value
elif [ \$action = "write" ];then
#assign direction
echo out > /sys/class/gpio/gpio\$pin/direction
#assign value
echo \$value > /sys/class/gpio/gpio\$pin/value
else
echo "Unknown parameter"
fi
#remove gpio instance
echo \$pin > /sys/class/gpio/unexport
EOF
chmod +x ~/gpio.sh
3. Main update script
sudo service klipper stop
cd ~/klipper/
git pull
make clean
sudo sh ~/gpio.sh write 20 1 # dfu mode on
sudo sh ~/gpio.sh write 21 0 # reset on
sleep 0.2
sudo sh ~/gpio.sh write 21 1 # reset off
make flash FLASH_DEVICE=0483:df11
sudo sh ~/gpio.sh write 20 0 # dfu mode off
sudo sh ~/gpio.sh write 21 0 # reset on
sleep 0.2
sudo sh ~/gpio.sh write 21 1 # reset off
# Update MCU if you need
sudo service klipper_mcu stop
cd ~/klipper_mcu/
git pull
make clean
make flash
sudo service klipper_mcu start
# Update EBB if you need
cd ~/klipper_ebb/
git pull
make clean
make
python3 ~/CanBoot/scripts/flash_can.py -i can0 -f ./out/klipper.bin -u d22185cfd0c4
sudo service klipper start