Open arlucio opened 3 years ago
upgrade firmware before starting to run Micropython code.
This is probably too intrusive.
What I learned from docs is that you need to build specific incremental images to make it work. Should be quite straightforward otherwise. Lod files are just addresses and text.
I started making an OTA module that uses the FOTA API (https://ai-thinker-open.github.io/GPRS_C_SDK_DOC/en/c-sdk/function-api/fota.html) to update the firmware from a server. I would try running this from a micropython code or, if it doesn't work, use native code to check for updates and upgrade firmware before starting to run Micropython code.
I started to make the module but couldn't go further because I can't generate the .pack file to test at all, even using the FOTA example. Maybe I will come back to this later, but if anyone wants to give it a try. Would be something like this.
There are already ways to just update .py/.mpy files like this one (https://medium.com/@ronald.dehuysser/micropython-ota-updates-and-github-a-match-made-in-heaven-45fde670d4eb). OTA updating entire firmware with all modules/main freezed seems better in terms of security and also update the freezed modules and bugs from the platform.