Skip to content

Commit

Permalink
move to Wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
scaprile committed Jan 3, 2025
1 parent 6cf36b5 commit f0df6c6
Show file tree
Hide file tree
Showing 44 changed files with 125 additions and 692 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ jobs:
- path: nxp/rt1020-evk-make-baremetal-builtin
- path: nxp/rt1060-evk-make-baremetal-builtin
- path: nxp/rt1170-evk-make-baremetal-builtin
- path: pico-sdk/pico-w-picosdk-baremetal-builtin
- path: pico-sdk/pico-2-w-picosdk-baremetal-builtin
- path: pico-sdk/w5500-evb-pico-picosdk-baremetal-builtin
- path: pico-sdk/w5500-evb-pico2-picosdk-baremetal-builtin
- path: stm32/nucleo-f429zi-make-baremetal-builtin
- path: stm32/nucleo-f429zi-make-freertos-builtin
- path: stm32/nucleo-f746zg-make-baremetal-builtin
Expand Down Expand Up @@ -443,12 +447,8 @@ jobs:
- path: nxp/rt1170-evk-make-freertos-builtin
- path: renesas/ek-ra6m4-make-baremetal-builtin
- path: pico-sdk/pico-rndis-dashboard
- path: pico-sdk/pico-w-picosdk-baremetal-builtin
- path: pico-sdk/pico-w-picosdk-freertos-lwip
- path: pico-sdk/pico-2-w-picosdk-baremetal-builtin
- path: pico-sdk/pico-2-w-picosdk-freertos-lwip
- path: pico-sdk/w5500-evb-pico-picosdk-baremetal-builtin
- path: pico-sdk/w5500-evb-pico2-picosdk-baremetal-builtin
- path: stm32/nucleo-f746zg-make-freertos-tcp
- path: stm32/nucleo-f746zg-make-baremetal-builtin-cmsis_driver
name: ${{ matrix.example.path }} ${{ matrix.ssl }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/quicktest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ jobs:
- path: nxp/rt1020-evk-make-baremetal-builtin
- path: nxp/rt1060-evk-make-baremetal-builtin
- path: nxp/rt1170-evk-make-baremetal-builtin
- path: pico-sdk/pico-w-picosdk-baremetal-builtin
- path: pico-sdk/pico-2-w-picosdk-baremetal-builtin
- path: pico-sdk/w5500-evb-pico-picosdk-baremetal-builtin
- path: pico-sdk/w5500-evb-pico2-picosdk-baremetal-builtin
- path: stm32/nucleo-f429zi-make-baremetal-builtin
- path: stm32/nucleo-f429zi-make-freertos-builtin
- path: stm32/nucleo-f746zg-make-baremetal-builtin
Expand Down Expand Up @@ -309,12 +313,8 @@ jobs:
- path: nxp/rt1170-evk-make-freertos-builtin
- path: renesas/ek-ra6m4-make-baremetal-builtin
- path: pico-sdk/pico-rndis-dashboard
- path: pico-sdk/pico-w-picosdk-baremetal-builtin
- path: pico-sdk/pico-w-picosdk-freertos-lwip
- path: pico-sdk/pico-2-w-picosdk-baremetal-builtin
- path: pico-sdk/pico-2-w-picosdk-freertos-lwip
- path: pico-sdk/w5500-evb-pico-picosdk-baremetal-builtin
- path: pico-sdk/w5500-evb-pico2-picosdk-baremetal-builtin
- path: stm32/nucleo-f746zg-make-freertos-tcp
- path: stm32/nucleo-f746zg-make-baremetal-builtin-cmsis_driver
name: ${{ matrix.example.path }}
Expand Down Expand Up @@ -738,7 +738,7 @@ jobs:
with: { fetch-depth: 2 }
- name: SDK
run: |
if ./test/match_changed_files.sh "^src|examples/device-dashboard|examples/pico-sdk/w5500-evb-pico-picosdk-baremetal-builtin" ; then
if ./test/match_changed_files.sh "^src" ; then
echo GO=1 >> $GITHUB_ENV
sudo apt -y update && sudo apt -y install gcc-arm-none-eabi
fi
Expand Down

This file was deleted.

45 changes: 29 additions & 16 deletions examples/pico-sdk/pico-2-w-picosdk-baremetal-builtin/Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
RM = rm -rf
MKBUILD = rm -rf build && mkdir -p build # test -d build || mkdir build
ifeq ($(OS),Windows_NT)
RM = cmd /C del /Q /F /S
MKBUILD = if not exist build mkdir build
endif
BOARD = pico2-w
IDE = Pico-SDK
RTOS = baremetal
WIZARD_URL ?= http://mongoose.ws/wizard

all example:
true
all build example: firmware.uf2

build: pico-sdk build/firmware.uf2
firmware.uf2: wizard
make -C wizard CFLAGS_EXTRA=$(CFLAGS_EXTRA) && mv wizard/build/firmware.uf2 ./

build/firmware.uf2:
$(MKBUILD)
cd build && cmake -DPICO_BOARD="pico2_w" -G "Unix Makefiles" .. && make
wizard:
hash=$$(curl -s -X POST -H "Content-Type: application/json" -d '{"build":{"board":"$(BOARD)","ide":"$(IDE)","rtos":"$(RTOS)"}}' $(WIZARD_URL)/api/hash | jq -r '.hash') \
&& curl -s $(WIZARD_URL)/api/zip/$(BOARD)/$(IDE)/$(RTOS)/$$hash -o wizard.zip
unzip wizard.zip
cd wizard ; rm mongoose.[ch] ; ln -s ../../../../mongoose.c ; ln -s ../../../../mongoose.h

pico-sdk:
git clone --depth 1 -b 2.1.0 https://github.com/raspberrypi/pico-sdk $@
cd $@ && git submodule update --init
flash: firmware.uf2
picotool load $< -f

# Automated remote test. Requires env variable VCON_API_KEY set. See https://vcon.io/automated-firmware-tests/
DEVICE_URL ?= https://dash.vcon.io/api/v3/devices/??
# stdio has to be changed from USB to UART in CMakeLists.txt
update: wizard
sed -i -e 's/pico_enable_stdio_usb(firmware 1)/pico_enable_stdio_usb(firmware 0)/' wizard/CMakeLists.txt
(test `grep -c "pico_enable_stdio_uart(firmware 1)" wizard/CMakeLists.txt` -eq 0 && echo "pico_enable_stdio_uart(firmware 1)" >> wizard/CMakeLists.txt) || true
make -C wizard CFLAGS_EXTRA=$(CFLAGS_EXTRA) && mv wizard/build/firmware.uf2 ./
curl --fail-with-body -su :$(VCON_API_KEY) $(DEVICE_URL)/ota?uf2=1 --data-binary @firmware.uf2

test: update
curl --fail-with-body -su :$(VCON_API_KEY) $(DEVICE_URL)/tx?t=15 | tee /tmp/output.txt
grep 'READY, IP:' /tmp/output.txt # Check for network init

clean:
$(RM) pico-sdk build
rm -rf firmware.* wizard* pico-sdk

Original file line number Diff line number Diff line change
@@ -1,4 +1 @@

# Mongoose on PICO 2 W


See [Wizard](https://mongoose.ws/wizard/#/output?board=pico2-w&ide=Pico-SDK&rtos=baremetal&file=README.md)
48 changes: 0 additions & 48 deletions examples/pico-sdk/pico-2-w-picosdk-baremetal-builtin/main.c

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion examples/pico-sdk/pico-2-w-picosdk-baremetal-builtin/net.c

This file was deleted.

1 change: 0 additions & 1 deletion examples/pico-sdk/pico-2-w-picosdk-baremetal-builtin/net.h

This file was deleted.

This file was deleted.

This file was deleted.

28 changes: 0 additions & 28 deletions examples/pico-sdk/pico-w-picosdk-baremetal-builtin/CMakeLists.txt

This file was deleted.

45 changes: 29 additions & 16 deletions examples/pico-sdk/pico-w-picosdk-baremetal-builtin/Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
RM = rm -rf
MKBUILD = rm -rf build && mkdir -p build # test -d build || mkdir build
ifeq ($(OS),Windows_NT)
RM = cmd /C del /Q /F /S
MKBUILD = if not exist build mkdir build
endif
BOARD = pico-w
IDE = Pico-SDK
RTOS = baremetal
WIZARD_URL ?= http://mongoose.ws/wizard

all example:
true
all build example: firmware.uf2

build: pico-sdk build/firmware.uf2
firmware.uf2: wizard
make -C wizard CFLAGS_EXTRA=$(CFLAGS_EXTRA) && mv wizard/build/firmware.uf2 ./

build/firmware.uf2:
$(MKBUILD)
cd build && cmake -DPICO_BOARD="pico_w" -G "Unix Makefiles" .. && make
wizard:
hash=$$(curl -s -X POST -H "Content-Type: application/json" -d '{"build":{"board":"$(BOARD)","ide":"$(IDE)","rtos":"$(RTOS)"}}' $(WIZARD_URL)/api/hash | jq -r '.hash') \
&& curl -s $(WIZARD_URL)/api/zip/$(BOARD)/$(IDE)/$(RTOS)/$$hash -o wizard.zip
unzip wizard.zip
cd wizard ; rm mongoose.[ch] ; ln -s ../../../../mongoose.c ; ln -s ../../../../mongoose.h

pico-sdk:
git clone --depth 1 -b 2.0.0 https://github.com/raspberrypi/pico-sdk $@
cd $@ && git submodule update --init
flash: firmware.uf2
picotool load $< -f

# Automated remote test. Requires env variable VCON_API_KEY set. See https://vcon.io/automated-firmware-tests/
DEVICE_URL ?= https://dash.vcon.io/api/v3/devices/??
# stdio has to be changed from USB to UART in CMakeLists.txt
update: wizard
sed -i -e 's/pico_enable_stdio_usb(firmware 1)/pico_enable_stdio_usb(firmware 0)/' wizard/CMakeLists.txt
(test `grep -c "pico_enable_stdio_uart(firmware 1)" wizard/CMakeLists.txt` -eq 0 && echo "pico_enable_stdio_uart(firmware 1)" >> wizard/CMakeLists.txt) || true
make -C wizard CFLAGS_EXTRA=$(CFLAGS_EXTRA) && mv wizard/build/firmware.uf2 ./
curl --fail-with-body -su :$(VCON_API_KEY) $(DEVICE_URL)/ota?uf2=1 --data-binary @firmware.uf2

test: update
curl --fail-with-body -su :$(VCON_API_KEY) $(DEVICE_URL)/tx?t=15 | tee /tmp/output.txt
grep 'READY, IP:' /tmp/output.txt # Check for network init

clean:
$(RM) pico-sdk build
rm -rf firmware.* wizard* pico-sdk

5 changes: 1 addition & 4 deletions examples/pico-sdk/pico-w-picosdk-baremetal-builtin/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@

# Mongoose on PICO W


See [Wizard](https://mongoose.ws/wizard/#/output?board=pico-w&ide=Pico-SDK&rtos=baremetal&file=README.md)
Loading

0 comments on commit f0df6c6

Please sign in to comment.