Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
When hitting ota2_bootloader.c::ota2_failsafe_app_load() the entry point is a flash address 0x800c3e5 but it hasn't been loaded into internal flash from SFlash. I see ota2_failsafe_app_load() erasing (internal?) flash:
/* Erase the application area */ result = ota2_failsafe_app_area_erase( flash_location, &header );
Then reading into RAM from flash:
result = ota2_failsafe_app_read( flash_location, (uint8_t*)prog_header.physical_address, prog_header.data_offset, prog_header.data_size_in_file );
But danged if it's obvious how internal flash get's written! It is quite clear in wiced_waf_common.c::wiced_waf_app_load():
result = platform_load_app_chunk( app_header_location, offset, (void*) prog_header.physical_address, prog_header.data_size_in_file );
Simply so I can verify it would load and run failsafe. Previously, I had used ModusToolbox to run ota2_failsafe without any problem. There's no output because the ota2_bootloader does select the failsafe path, but then jumps into a hardfault. That led me to wonder how the sflash image was being copied into iflash. Unless the ota2_failsafe image is supposed to run entirely out of SRAM, I couldn't follow the ota2_bootloader logic.