Skip to content

Instantly share code, notes, and snippets.

@ayufan
Last active February 17, 2024 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayufan/21c2ea6d23f583de0f9485aaac92610d to your computer and use it in GitHub Desktop.
Save ayufan/21c2ea6d23f583de0f9485aaac92610d to your computer and use it in GitHub Desktop.
Easily manage many klipper configs
#!/bin/bash
case "$1" in
config-*)
CONFIG_NAME="$1"
;;
configs)
cd ~/klippy-configs
ls -1 klipper-config-*
exit 0
;;
*)
echo "Config name needs to start with 'config-': $1"
exit 1
;;
esac
shift
cd ~/klipper
set -xeo pipefail
exec make KCONFIG_CONFIG="$PWD/klippy-configs/klipper-$CONFIG_NAME" OUT="$PWD/klipper/out/$CONFIG_NAME/" -j3 "$@"
@ayufan
Copy link
Author

ayufan commented Feb 16, 2024

Use with:

klipper-make config-skr-pico menuconfig
klipper-make config-skr-pico flash
klipper-make config-skr-mini-v3 menuconfig
klipper-make config-skr-mini-v3 flash

@ayufan
Copy link
Author

ayufan commented Feb 17, 2024

Then create a script to flash all boards at once:

#!/bin/bash

/opt/klipper-data/bin/klipper-make config-v0-cheetah-v2 flash FLASH_DEVICE=/dev/serial/by-id/usb-Klipper_stm32f401xc_3C003C000851383531393138-if00
/opt/klipper-data/bin/klipper-make config-v0-display flash FLASH_DEVICE=/dev/serial/by-id/usb-Klipper_stm32f042x6_270006000243535031303820-if00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment