-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefw.sh
More file actions
executable file
·71 lines (62 loc) · 1.76 KB
/
makefw.sh
File metadata and controls
executable file
·71 lines (62 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/sh
# Klipper firmware build script
# Usage: ./makefw.sh [ebb|skr]
# ebb - Build only for EBB36 board
# skr - Build only for SKR Mini v1.3 board
# no arg - Build for both boards
set -e # Exit on error
# Color output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
print_info() {
echo "${GREEN}[INFO]${NC} $1"
}
print_error() {
echo "${RED}[ERROR]${NC} $1"
}
print_warning() {
echo "${YELLOW}[WARNING]${NC} $1"
}
build_ebb() {
print_info "Building firmware for EBB36..."
make clean KCONFIG_CONFIG=.config.ebb
echo q | make menuconfig KCONFIG_CONFIG=.config.ebb
make KCONFIG_CONFIG=.config.ebb
print_info "Flashing EBB36 via CAN (UUID: d929e5aab5a4)..."
python ../katapult/scripts/flashtool.py -u d929e5aab5a4 -f out/klipper.bin
print_info "EBB36 build and flash complete!"
}
build_skr() {
print_info "Building firmware for SKR Mini v1.3..."
make clean KCONFIG_CONFIG=.config.skr
echo q | make menuconfig KCONFIG_CONFIG=.config.skr
make KCONFIG_CONFIG=.config.skr
print_info "Flashing SKR Mini v1.3 via serial (/dev/ttyACM0)..."
python ../katapult/scripts/flashtool.py -d /dev/ttyACM0 -f out/klipper.bin
print_info "SKR Mini v1.3 build and flash complete!"
}
# Main script
case "${1:-both}" in
ebb|e)
build_ebb
;;
skr|s)
build_skr
;;
both)
build_ebb
echo ""
build_skr
;;
*)
print_error "Invalid argument: $1"
echo "Usage: $0 [ebb|e|skr|s]"
echo " ebb|e - Build only for EBB36 board"
echo " skr|s - Build only for SKR Mini v1.3 board"
echo " (no arg) - Build for both boards"
exit 1
;;
esac
print_info "All builds completed successfully!"