-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
125 additions
and
692 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
examples/pico-sdk/pico-2-w-picosdk-baremetal-builtin/CMakeLists.txt
This file was deleted.
Oops, something went wrong.
45 changes: 29 additions & 16 deletions
45
examples/pico-sdk/pico-2-w-picosdk-baremetal-builtin/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
5 changes: 1 addition & 4 deletions
5
examples/pico-sdk/pico-2-w-picosdk-baremetal-builtin/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
48
examples/pico-sdk/pico-2-w-picosdk-baremetal-builtin/main.c
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
examples/pico-sdk/pico-2-w-picosdk-baremetal-builtin/mongoose.c
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
examples/pico-sdk/pico-2-w-picosdk-baremetal-builtin/mongoose.h
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
examples/pico-sdk/pico-2-w-picosdk-baremetal-builtin/mongoose_config.h
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
examples/pico-sdk/pico-2-w-picosdk-baremetal-builtin/packed_fs.c
This file was deleted.
Oops, something went wrong.
84 changes: 0 additions & 84 deletions
84
examples/pico-sdk/pico-2-w-picosdk-baremetal-builtin/pico_sdk_import.cmake
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
examples/pico-sdk/pico-w-picosdk-baremetal-builtin/CMakeLists.txt
This file was deleted.
Oops, something went wrong.
45 changes: 29 additions & 16 deletions
45
examples/pico-sdk/pico-w-picosdk-baremetal-builtin/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Oops, something went wrong.