nixiesp12/firmware/Makefile

22 lines
767 B
Makefile
Raw Normal View History

2024-10-03 21:03:50 +00:00
SKETCH_FOLDER := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
UPLOAD_PORT ?= /dev/ttyUSB0
2018-12-23 21:28:40 +00:00
2024-10-03 21:03:50 +00:00
all: $(SKETCH_FOLDER)/build/firmware.ino.bin
2018-12-23 21:28:40 +00:00
2024-10-03 21:03:50 +00:00
$(SKETCH_FOLDER)/cities.h: cities.py
python3 cities.py > $(SKETCH_FOLDER)/cities.h
2018-12-23 21:28:40 +00:00
2024-10-03 21:03:50 +00:00
$(SKETCH_FOLDER)/build/firmware.ino.bin: $(SKETCH_FOLDER)/firmware.ino $(SKETCH_FOLDER)/cities.h
arduino-cli compile -e -b esp8266:esp8266:generic $(SKETCH_FOLDER)
2018-12-23 21:28:40 +00:00
2024-10-03 21:03:50 +00:00
deps:
arduino-cli core install \
--additional-urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json esp8266:esp8266
arduino-cli lib install wifimanager ESP8266TimerInterrupt ezTime
2021-07-11 18:21:11 +00:00
2024-10-03 21:03:50 +00:00
flash: $(SKETCH_FOLDER)/firmware.ino.bin
arduino-cli upload -b esp8266:esp8266:generic -p $(UPLOAD_PORT) $(SKETCH_FOLDER)
2021-07-11 18:21:11 +00:00
2024-10-03 21:03:50 +00:00
console:
picocom -b 9600 $(UPLOAD_PORT)