forked from xixi-shredp/eedog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (32 loc) · 978 Bytes
/
Makefile
File metadata and controls
49 lines (32 loc) · 978 Bytes
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
USB_PORT = /dev/ttyUSB0
CHIP = esp32
BAUD = 115200
BUFFER_SIZE = 30
AMPY_PORT = $(USB_PORT)
MICRO_PYTHON_BIN = ./bin/micropython.bin
DOWNLOAD_FILES := $(wildcard ./src/*)
default:reset
env:
export AMPY_PORT=$(AMPY_PORT)
erase:
esptool --port $(USB_PORT) erase_flash
flash: erase
esptool --chip $(CHIP) --port $(USB_PORT) --baud $(BAUD) write_flash -z 0x1000 $(MICRO_PYTHON_BIN)
FINISH = $(patsubst %,./build/%.makeing,$(DOWNLOAD_FILES))
./build/%.makeing : %
touch $@
echo $@
# ampy --port $(USB_PORT) put $<
$(FINISH):$(DOWNLOAD_FILES)
run:
ampy --port $(AMPY_PORT) run ./src/main.py
# download all the files in src
download:$(FINISH)
init:flash download
reset:
ampy --port $(AMPY_PORT) reset
ampy --port $(AMPY_PORT) put $(DOWNLOAD_FILES)
ampy --port $(AMPY_PORT) run boot.py
shell:
gnome-terminal -- bash -c "rshell --buffer-size=$(BUFFER_SIZE) -p $(USB_PORT);exec bash"
.PHONY:default erase flash init download reset shell