Last active
May 17, 2020 20:55
-
-
Save pulsar256/4106eff3a02b1c3d340c1ab1753c6477 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Flashes a LPC based boards over the serial line connected to the GPIO headers of a RPI. | |
# In addition to the TX/RX lines you will also need to connect the BOOT and RESET lines. | |
# This configuration uses GPIO6 for RESET and GPIO12 for BOOT. Pin numbering is using | |
# the wiring standard. | |
pin_reset=22 | |
pin_boot=26 | |
firmware=$HOME/klipper/out/klipper.bin | |
sudo systemctl stop klipper | |
# enter boot bootloader sequence | |
# configure reset and boot GPIOs as outputs | |
gpio mode $pin_reset OUT | |
gpio mode $pin_boot OUT | |
# hold reset and bootloader down | |
gpio write $pin_reset 0 | |
gpio write $pin_boot 0 | |
# go back to high-z and let skr pullups set the lines to high | |
gpio mode $pin_reset IN | |
gpio mode $pin_boot IN | |
lpc21isp -wipe -bin $firmware /dev/ttyS0 230400 12000 | |
sudo systemctl start klipper |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment