1 Reply Latest reply on Jul 27, 2016 8:09 AM by rderr_1773541

    How to find Sector Start Address for flashing apps to external flash

    suchitra.hullur

      Hi

      I want to have 3 apps in the external flash from which I can switch between these three apps using  wiced_framework_set_boot() function and wiced_framework_reboot()

       

      I am using a prototype board with STMF405 and has an external flash of 4MB. I am able to flash the apps at different locations using sflash_write.tcl but I am not able to switch between the apps.

       

      I am able to do the switching with the Avnet IOT starter kit when I am flashing the images to external flash via the download_apps command

       

      As of now to find the start address to which I should flash the images, I am first flashing to the AVNET Board with the download_apps option and using the same address for my prototype board. But that doesn't seems to work.

       

      1) How I can modify my script so that I will get the proper address at which I can flash all the apps and hope that it solves my issue with rebooting with the new Image.

       

      2) Is the address going wrong or is there any other issues that is preventing me from booting with the new app.

       

      3) And also what or how exactly the wiced_framework_set_boot() function determines the address at which it should look for the image in external flash

       

      I am able to do an OTA upgrade using ota_fr app in my prototype board

        • 1. Re: How to find Sector Start Address for flashing apps to external flash
          rderr_1773541

          Hi,

           

          The locations of the different datasets in the external flash is specified in the apps lookup table (wiced-sdk/WCIED/platform/MCU/wcied_app_lut.c) which is always placed at offset zero in the external flash.  I suspect the reason why your prototype board isn't working is because you're probably not flashing the APPS.bin file to the first sector of the external flash.  The APPS.bin file is located in wiced-sdk/build/(project-name)/APPS.bin and is generated when you build your project. 

           

          It would be nice if the build scripts created a text file with the addresses of the objects in the flash.  I do what you're doing though... I just note what the address is when I run download_apps and include those values in by production build script...  I suspect it wouldn't take much to modify the build script (wiced-sdk/tools/makesilfes/wiced_apps.mk) to spit out that file...

           

          -Rob

          1 of 1 people found this helpful