Does anyone have a clue? Because I am totally stuck on this.
What is your platform? Also, try writing to APP0 as a start and see if this would work.
PS: make sure to add the download_apps target to your make command
Thanks for your suggestion.
My platform is SN8205 from murata.
I already have the OTA implemented the normal way with the upload page and the bootloader for that already has the download apps included in it and partitions the flash.
However I am now running in APP0, which is loaded using default wiced ota. From there I try to download the file using http and write to APP1 but the open already gives the crash.
If I try to write to app0 I would overwrite myself, this I don't want because if anything go wrong I still have APP0 as fallback.
The OTA is platform dependent, some platform configurations are required to have OTA working for your platform. Usually your platform provider should help you with this. However here are few configs you need to make sure you have:
- In the platfrom config file (probably in platforms/sn8205/sn8205.mk) you need to make sure the locations of the lookup table and appliacations in serial flash is defined, for example:
# WICED APPS LOOKUP TABLE
APPS_LUT_HEADER_LOC := 0x0000
APPS_START_SECTOR := 1
- you platform_config.h need to define PLATFORM_HAS_OTA
/* OTA */
- your platform.h need to indicate that is has an external spi flash and the CS (chip select) pin:
/* SPI flash is present */
#define WICED_SPI_FLASH_CS ( WICED_GPIO_5 )
try to have a look at other platforms to get a view of the configurations.
PS: it would also help if you can put any logs mainly the build /download logs to see what is going on.