Skip to content

Commit afc988e

Browse files
committed
Add separate README, move the python script, and add note about no_flash commented out lines
1 parent fbcc887 commit afc988e

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ App|Description
203203
[picow_http_client](pico_w/wifi/http_client) | Demonstrates how to make http and https requests
204204
[picow_http_client_verify](pico_w/wifi/http_client) | Demonstrates how to make a https request with server authentication
205205
[picow_mqtt_client](pico_w/wifi/mqtt) | Demonstrates how to implement a MQTT client application
206-
[picow_ota_update](pico_w/wifi/ota_update) | A simple OTA update server (RP235x Only). You can run [python_ota_update.py](pico_w/wifi/python_test_tcp/python_ota_update.py) to upload UF2s to it.
206+
[picow_ota_update](pico_w/wifi/ota_update) | A minimal OTA update server (RP235x Only). See the separate [README](pico_w/wifi/ota_update/README.md) for more details.
207207

208208
#### FreeRTOS examples
209209

pico_w/wifi/ota_update/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ pico_use_wifi_firmware_partition(picow_ota_update)
2121

2222
pico_hash_binary(picow_ota_update)
2323
pico_sign_binary(picow_ota_update ${CMAKE_CURRENT_LIST_DIR}/private.pem)
24+
25+
# By default this example requires a partition table in flash, and will
26+
# update the partition that is not currently in use. To use it without
27+
# a partition table in flash, uncomment the following lines to make it
28+
# a no_flash binary, so it can update the currently running program.
29+
2430
# pico_set_binary_type(picow_ota_update no_flash)
2531
# pico_package_uf2_output(picow_ota_update 0x10000000)
2632

pico_w/wifi/ota_update/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
This example requires a partition table in flash. This can be loaded by creating a UF2 from the partition table JSON in this folder:
2+
```
3+
picotool partition create main.json pt.uf2
4+
```
5+
then dragging & dropping this UF2 onto the device, or loading it using `picotool` and rebooting:
6+
```
7+
picotool load pt.uf2
8+
picotool reboot -u
9+
```
10+
11+
Once the partition table is loaded, you first need to load the Wi-Fi firmware UF2 (`picow_ota_update_firmware.uf2`) followed by loading & executing the main program (`picow_ota_update.uf2`) - either by dragging and dropping them in order, or using `picotool`:
12+
```
13+
picotool load picow_ota_update_firmware.uf2
14+
picotool load -x picow_ota_update.uf2
15+
```
16+
17+
Once running, you can use [python_ota_update.py](python_ota_update.py) to upload new UF2s to it using it's IP address:
18+
```
19+
python python_ota_update.py 192.168.0.103 picow_ota_update.uf2
20+
```

0 commit comments

Comments
 (0)