mongoose/examples/rp2040/pico-w5500/Makefile

22 lines
630 B
Makefile
Raw Normal View History

all example build obj/firmware.uf2: obj pico-sdk main.c net.c packed_fs.c
cd obj && cmake .. && make
2023-01-03 00:24:27 +08:00
obj:
mkdir $@
2023-01-03 00:24:27 +08:00
pico-sdk:
git clone --depth 1 -b 1.5.0 https://github.com/raspberrypi/pico-sdk $@
2023-01-03 00:24:27 +08:00
cd $@ && git submodule update --init
# Requires env variable VCON_API_KEY set
DEVICE_URL ?= https://dash.vcon.io/api/v3/devices/3
test: update
curl --fail -su :$(VCON_API_KEY) $(DEVICE_URL)/tx?t=5 | tee /tmp/output.txt
grep 'Ethernet: up' /tmp/output.txt
grep 'MQTT connected' /tmp/output.txt
update: obj/firmware.uf2
curl --fail -su :$(VCON_API_KEY) $(DEVICE_URL)/ota?uf2=1 --data-binary @$<
2023-01-03 00:24:27 +08:00
clean:
rm -rf pico-sdk obj