aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/Makefile
diff options
context:
space:
mode:
authorFilip Wandzio <contact@philw.dev>2025-09-04 22:25:39 +0200
committerFilip Wandzio <contact@philw.dev>2025-09-04 22:25:39 +0200
commit1ba21da6cbc63c0c549fb92731e25bedc482eb51 (patch)
treeddf6fc2259a2495f8de336a07873cc3c6796785e /firmware/Makefile
parente00f3a9ede1b8e46b480bd68daf48da0bb08acae (diff)
downloade1-1ba21da6cbc63c0c549fb92731e25bedc482eb51.tar.gz
e1-1ba21da6cbc63c0c549fb92731e25bedc482eb51.zip
Unify the directory, add new analysis methods, unify the code style
Signed-off-by: Filip Wandzio <contact@philw.dev>
Diffstat (limited to 'firmware/Makefile')
-rw-r--r--firmware/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
new file mode 100644
index 0000000..0fd1699
--- /dev/null
+++ b/firmware/Makefile
@@ -0,0 +1,33 @@
1ifneq (,$(wildcard .env))
2 include .env
3 export $(shell sed 's/=.*//' .env)
4endif
5
6ENV = esp32dev
7
8BUILD_FLAGS = -D WIFI_SSID="\\\"$(WIFI_SSID)\\\"" \
9 -D WIFI_PASS="\\\"$(WIFI_PASS)\\\"" \
10 -D MQTT_URI="\\\"$(MQTT_URI)\\\""
11
12.PHONY: build upload monitor clean debug-flags test
13
14build:
15 @echo "Starting build with SSID=$(WIFI_SSID)"
16 PLATFORMIO_BUILD_FLAGS="$(BUILD_FLAGS)" pio run -e $(ENV)
17
18upload:
19 @echo "Starting uploading process..."
20 PLATFORMIO_BUILD_FLAGS="$(BUILD_FLAGS)" pio run -e $(ENV) -t upload
21
22monitor:
23 pio device monitor -e $(ENV)
24
25clean:
26 pio run -e $(ENV) -t clean
27
28debug-flags:
29 @echo $(BUILD_FLAGS)
30
31test:
32 @echo "Starting unit tests..."
33 PLATFORMIO_BUILD_FLAGS="$(BUILD_FLAGS)" pio test -e $(ENV) -vvv