Support for nonos-sdk 3.0.x and legacy OTA #283
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements support for the latest Espressif nonos-sdk (second commit) and support for legacy OTA usable with nonos-sdk and rtos-sdk (v1.5) (third commit).
I know that Espressif is phasing out nonos-sdk, but I prefer avoid arduino framework and still use these two ones until rtos3-sdk is available.
Support for the Espressif nonos-sdk (3.0.5) requires :
To achieve that, the platform builder :
A fork of latest Espressif nonos-sdk with the addition of package.json is available at https://github.com/freedib/framework-esp8266-nonos-sdk.
To support for legacy OTA, the platform must create binaries for user1 and user2 which can be stored on an http server. If direct upload is required, user1 binary must be uploaded.
A new "ota" target is created in main.py. If used, then OTA files be generated. If not, non OTA files will be generated.
A python tool (genbin.py) similar to Espressif's gen_appbin.py allow to extract elf sections and create flash.bin+irom0.text.bin (non OTA) or user1.bin+user2.bin (OTA).
To achieve that, the platform builder :
The same code is used for nonos-sdk and rtos-sdk.
genbin.py is already packaged for platformio and available at https://github.com/freedib/tool-genbin.