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 :
a esp_init_data_default_v08.bin file which is different from original esp_init_data_default.bin
information about flash size map
To achieve that, the platform builder :
create the correct file list and sets FLASH_EXTRA_IMAGES variable for the linker
appends -DSPI_FLASH_SIZE_MAP=n to CCFLAGS for the compiler. main.c should handle this value accordingly to nonos-sdk notes.
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 :
sets BUILDERS/ElfToBin variable to call genbin.py with frequency, flash mode, memory parameters and name of output files.
sets FLASH_EXTRA_IMAGES variable with final files list for the uploader
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.
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 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 :