That, and most OTA updaters, quite sensibly download a new firmware image into the file system or safe area of Flash, then perform some ritual to burn that to the executable area at the start of Flash, reboot, et voila!
The problem is MicroPython firmware is quite large, about 800 KB and growing, and the file system is rather small, 848 KB.
That means it can be impossible to store an OTA MicroPython firmware image if you have loaded libraries or used files. My own MicroPython port is already larger than the file system and I wouldn't discount stock MicroPython going the same way.
OTA updates of MicroPython source files and modules should however be easy enough; download and write to file system, reboot, job done.
How to actually do a 'wireless REPL update' of files though is an interesting question. Using 'mip' (formerly 'upip') is one option and 'mpremote' and other tools should work if the 'wireless REPL' can be coaxed into being a serial port they can access and use. Alternatively issue a 'requests.get()' or similar and store the received data to file.
Statistics: Posted by hippy — Sat Jan 20, 2024 2:24 pm