raburton / rboot

An open source bootloader for the ESP8266
https://richard.burtons.org/tag/rboot/?order=ASC
MIT License
300 stars 72 forks source link

Can this codebase be used with ESP8266_NON_OS SDK for OTA ? #58

Open dipendra77 opened 4 years ago

dipendra77 commented 4 years ago

Hi, Can this codebase be used for OTA with ESP8266_NON_OS SDK ? I am using a 16Mbits flash version of ESP8266 , with two OTA partitions. OTA1 at address 0x1000 and OTA2 at address 0x81000. Both partitions have a size of 0x6A000 ( 434.176 KB ). I am not using rboot bootloader. I have already done a lot of work for my product and only stuck with OTA. I tried this code base , but it is failing at the writing to the flash part, probably fetching wrong address when i call the function rboot_get_config() . Can anyone help me out with this ?

raburton commented 4 years ago

Yes, it can be used for nonos, in fact when it was first written that's all there was. rBoot itself does not need the sdk to compile or the use any sdk code to run. Code that runs in you rom (e.g. downloads and writes to flash) will need to use SDK code. An example application that includes sample OTA code can be found here: https://github.com/raburton/rboot-sample-bigflash If you are not actually using rBoot bootloader, but trying to use rBoot OTA code (sounds a bit like that from your question) then that won't work. As you say there will be no rBoot config to read and without bootloader there will be no way to start the second rom after an OTA update.

dipendra77 commented 4 years ago

Is there any way to make OTA work with rboot and ESP8266 NON OS SDK v3.0.3?

raburton commented 4 years ago

I haven't tested with that specific version of the SDK, but rBoot should be able to boot any rom regardless of what SDK (or otherwise) it was built with.

fvpalha commented 4 years ago

I use rboot with ESP8266 NONOS SDK v3.1.0-dev commit: 3783b9d1 (Dec 4, 2019)