-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (33 loc) · 1.12 KB
/
Copy pathMakefile
File metadata and controls
43 lines (33 loc) · 1.12 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
# STM32 boards start flash memory at address 0x8000000
# and this board has 0x20000 (128Kb) of flash available
info:
@echo ""
@echo ""
@echo "--- IMPORTANT: ----"
@echo "Left ESC plug into channel 1 and requires any two motor-esc wires to not match color"
@echo "Right ESC plug into channel 2 and requires motor-esc wires to match color"
@echo ""
@echo ""
check-sudo: info
@if [ "$$EUID" -ne 0 ]; then \
echo "This target must be run as root (use sudo)."; \
exit 1; \
fi
# Takes the firmware currently on the board and dumps it into a binary file
dump: check-sudo info
@mkdir -p firmware
st-flash read firmware/some-esc-firmware.bin 0x8000000 0x20000
# Flashes the compiled firmware and flashes it on the connected board
flash: check-sudo info info
@mkdir -p firmware
st-flash write firmware/esc-firmware.bin 0x8000000
# Builds the source code into the .pio folder
# (but this does not flash it yet, nor does it produce a firmware.bin file)
build: check-sudo info
platformio run
flash-manual: check-sudo info
platformio run --target upload
find: info
platformio device list
debug: info
platformio device monitor