From bec470f6d7bfdae6af2b5ec9121533d23deb7ce3 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Fri, 6 Oct 2023 03:19:12 +0000 Subject: [PATCH] add makefile, rename main --- Makefile | 37 +++++++++++++++++++++++++++++++++++++ src/{main.cpp => main.cc} | 0 2 files changed, 37 insertions(+) create mode 100644 Makefile rename src/{main.cpp => main.cc} (100%) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d203656 --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +BOARD := sparkfun_esp32micromod +FIRMWARE := .pioenvs/$(BOARD)/firmware.bin +SOURCES := \ + src/main.cc + +PIO := pio run -e $(BOARD) + +$(FIRMWARE): $(SOURCES) + $(PIO) + +PHONY: all +all: $(FIRMWARE) + +.PHONY: upload +upload: $(FIRMWARE) + $(PIO) -t upload + +.PHONY: monitor +monitor: + $(PIO) -t monitor + +.PHONY: deploy +deploy: $(FIRMWARE) + $(PIO) -t upload && sleep 0.5 && $(PIO) -t monitor + +.PHONY: clean +clean: + $(PIO) -t clean + +.PHONY: cloc +cloc: + cloc include lib src + +.PHONY: test +test: + $(PIO) -t test + diff --git a/src/main.cpp b/src/main.cc similarity index 100% rename from src/main.cpp rename to src/main.cc