blob: 5b5b6e1c0214b5e52c72bd7c3443fe0c32de621b (
plain)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
# =============================================
# FastForge – Pebble Intermittent Fasting App
# Justfile for Fedora Linux + Pebble SDK 4.9+ (2026)
# =============================================
# Default emulator: gabbro = Pebble Round 2 (new hardware, 260×260 round display)
# Use 'just dev-basalt' / 'just debug-dev-basalt' for the older rectangular display.
emulator := "gabbro"
emulator_old := "basalt"
# Default: show all available commands
default:
@just --list
# Aliases (shortcuts)
alias b := build
alias i := install
alias d := dev
alias l := logs
alias s := screenshot
alias c := clean
alias k := kill
# ─────────────────────────────────────────────
# Core development commands
# ─────────────────────────────────────────────
# Build the app
build:
pebble build
# Install to the gabbro emulator (Pebble Round 2)
install:
pebble install --emulator {{emulator}}
# Build + install on Pebble Round 2 (gabbro) — primary target
# Kills any stale emulator first so install never races against the boot animation.
dev:
-pebble kill
pebble build && pebble install --emulator {{emulator}}
# Build + install on old rectangular display (basalt)
dev-basalt:
-pebble kill
pebble build && pebble install --emulator {{emulator_old}}
# Show live logs (run this in a **second** terminal)
logs:
pebble logs --emulator {{emulator}}
# Show live logs for basalt emulator
logs-basalt:
pebble logs --emulator {{emulator_old}}
# Take a screenshot of the emulator
screenshot:
pebble screenshot --emulator {{emulator}}
# Take a screenshot of the basalt emulator
screenshot-basalt:
pebble screenshot --emulator {{emulator_old}}
# ─────────────────────────────────────────────
# Emulator control
# ─────────────────────────────────────────────
# Kill / stop the running emulator
kill:
pebble kill
# ─────────────────────────────────────────────
# Emulator recovery
# ─────────────────────────────────────────────
# Reset the gabbro SPI flash to factory state.
# Use this when 'just dev' hangs on the Pebble boot screen — it means the
# flash was corrupted (e.g. by killing multiple concurrent qemu processes).
reset-flash:
-pebble kill
bunzip2 -k -c ~/.pebble-sdk/SDKs/4.9.148/sdk-core/pebble/gabbro/qemu/qemu_spi_flash.bin.bz2 > ~/.pebble-sdk/4.9.148/gabbro/qemu_spi_flash.bin
@echo "Flash reset to factory state. Run 'just dev' to reinstall."
# Reset the basalt SPI flash to factory state.
reset-flash-basalt:
-pebble kill
bunzip2 -k -c ~/.pebble-sdk/SDKs/4.9.148/sdk-core/pebble/basalt/qemu/qemu_spi_flash.bin.bz2 > ~/.pebble-sdk/4.9.148/basalt/qemu_spi_flash.bin
@echo "Flash reset to factory state. Run 'just dev-basalt' to reinstall."
# ─────────────────────────────────────────────
# Maintenance commands
# ─────────────────────────────────────────────
# Clean all build artifacts
clean:
rm -rf build/ *.pbw *.elf *.bin *.map *.o config.log .lock-waf* .wafpickle*
# Full clean + rebuild + install
rebuild:
just clean
just dev
# Quick rebuild + install
quick:
just build && just install
# Run host unit tests (TZ=UTC for deterministic localtime/streak checks)
test:
make -C tests test
# Build with DEBUG=1 compile flag
debug-build:
DEBUG=1 pebble build
# Build + install debug app on Pebble Round 2 (gabbro)
# Kills any stale emulator first (same reason as dev).
debug-dev:
-pebble kill
DEBUG=1 pebble build && pebble install --emulator {{emulator}}
# Build + install debug app on old rectangular display (basalt)
debug-dev-basalt:
-pebble kill
DEBUG=1 pebble build && pebble install --emulator {{emulator_old}}
# ─────────────────────────────────────────────
# Debug / Testing helpers
# ─────────────────────────────────────────────
# Build, install, and remind you to open logs
dev-with-logs:
@echo "Building and installing..."
just dev
@echo ""
@echo "Now open a second terminal and run: just logs"
# Show current SDK version
sdk-version:
pebble --version
# Help / reminder
help:
@echo "FastForge development commands:"
@echo " just dev → build + install on Round 2/gabbro (primary)"
@echo " just dev-basalt → build + install on old basalt display"
@echo " just logs → live logs for gabbro (second terminal)"
@echo " just logs-basalt → live logs for basalt (second terminal)"
@echo " just kill → stop the emulator"
@echo " just clean → remove build files"
@echo " just rebuild → clean + dev"
@echo ""
@echo "Run 'just' to see all available commands."
|