forked from tuupola/micropython-m5stack
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (26 loc) · 883 Bytes
/
Makefile
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
.DEFAULT_GOAL := help
#PORT=/dev/tty.SLAB_USBtoUART
PORT=/dev/ttyUSB0
help:
@echo ""
@echo "Available tasks:"
@echo " watch Upload changed *.py files to flash automatically"
@echo " shell Start an remote shell session"
@echo " sync Sync contents of firmware folder to flash"
@echo " reset Soft reboot the board"
@echo " repl Start a repl session"
@echo " deps Install dependencies with upip"
@echo ""
watch:
find . -name "*.py" | entr -c sh -c 'make sync && make reset'
sync:
rshell --port $(PORT) --timing --buffer-size=32 rsync --mirror --verbose ./$(folder) /flash
shell:
rshell --port $(PORT) --timing --buffer-size=32
repl:
screen $(PORT) 115200
reset:
rshell --port $(PORT) --timing --buffer-size=32 repl "~ import machine ~ machine.reset()~"
deps:
@echo "Nothing to install..."
.PHONY: help watch sync shell repl reset deps