2023-04-12 04:47:38 +08:00
|
|
|
# Do NOT use parenthesis on Windows project dir names
|
2023-06-27 05:20:38 +08:00
|
|
|
PROJECTS ?= $(wildcard ../../examples/stm32/nucleo-*-keil-*)
|
|
|
|
TARGET ?= "Target 1"
|
2023-04-12 04:47:38 +08:00
|
|
|
|
|
|
|
all: $(PROJECTS)
|
|
|
|
|
|
|
|
# Need to test inside .bat to check and transfer errors
|
|
|
|
$(PROJECTS): FORCE
|
2023-06-27 05:20:38 +08:00
|
|
|
unitest.bat $(subst /,\,$@) $(TARGET)
|
2023-04-12 04:47:38 +08:00
|
|
|
|
|
|
|
FORCE:
|
2023-06-27 05:20:38 +08:00
|
|
|
|
|
|
|
# Automated remote test. See https://vcon.io/automated-firmware-tests/
|
|
|
|
URL ?= https://dash.vcon.io/api/v3/devices
|
|
|
|
update: $(PROJECTS)
|
|
|
|
curl -su :$(VCON_API_KEY) $(URL)/$(DEVICE)/ota?hex=1 --data-binary @$</Objects/firmware.hex
|
|
|
|
|
|
|
|
test update: TARGET = Test
|
|
|
|
test: update
|
|
|
|
curl --fail-with-body -su :$(VCON_API_KEY) $(URL)/$(DEVICE)/tx?t=5
|
|
|
|
# TODO(): no tee, no grep
|
|
|
|
#| tee /tmp/output.txt
|
|
|
|
# grep 'READY, IP:' /tmp/output.txt # Check for network init
|