usedbytes / picowota

A bootloader for OTA WiFi code upload to a Raspberry Pi Pico W
BSD 3-Clause "New" or "Revised" License
116 stars 21 forks source link

build with MicroPython #3

Open kisChang opened 1 year ago

kisChang commented 1 year ago

nice work! Thank you!

I use it to build rp2040 micropython, need to add GC information to complete the build

kisChang commented 1 year ago

on commit bab04f6 can using picowota_reboot on MicroPython usermod

usedbytes commented 1 year ago

Hi,

I wonder if these changes would be better in the micropython repository rather than here?

The micropython reboot module is only depending on exported functionality, and duplicating the build rules with a custom linker script wouldn't be very complicated.

kisChang commented 1 year ago

1、 My idea is to integrate picowota_reboot into MicroPython as a module. This way I can switch the device to OTA mode in normal running with the following Python code:

import picowota_reboot
picowota_reboot.reboot(True)

I think if PICOWOTAWIFI* can using config_file(or other plan), can add change function on picowota_reboot, Thus realizing a complete automatic ota function on MicroPython app.py(user Program).

2、 pr adds a separate file, which will not be used in other c projects. In MicroPython, it can be directly built with link instructions. I don't think it affects either party. So I think it's more appropriate to put it here.

3、It is actually not necessary for this project, I think it can not be merged, but the PR is reserved for reference and merged by people with the same needs.

My English is not good, use the translator, sorry.