3 Replies Latest reply on Jan 7, 2015 2:17 PM by SeyhanA_31

    Altering your code's startup address



          (I'm using the Broadcom EVK, BCM 943341).

          I want to load my app at a different address in flash than the customary: 0x0800C000.  (This is Sector 3 in my Internal Flash, I would like to load the app into Sector 13 instead and boot it from there).


          Is there a make global that I can set that will cause this?


          Cheers, Robert



        • 1. Re: Altering your code's startup address


          You may change the linker definitions in /WICED/platform/MCU/STM32F4xx/GCC/STM32F417/memory_with_bootloader.ld. Make sure the application fits on the location reserved.


          If you going to alter how the application is mapped that do not align with defined flash sectors by PLATFORM_APP_START_SECTOR and PLATFORM_APP_END_SECTOR, they may need to updated as well in ...//WICED/platform/MCU/STM32F4xx/WAF/waf_platform.c


          1 of 1 people found this helpful
          • 2. Re: Altering your code's startup address



               That worked like a champ! Thanks!


               BTW, what 4-byte (address) value would I change to alter the "startup address" for the application.  That is, what location (what variable in the DCT structure) in the DCT would I alter so that upon the next REBOOT, it would start the app at this new location?


            Cheers, Robert

            • 3. Re: Altering your code's startup address



              I am confused with your question but here is some info regarding application start and DCT.


              The "PROVIDE( app_code_start_addr_loc = ORIGIN( APP_CODE ));" in .../WICED/platform/MCU/STM32F4xx/GCC/STM32F417/memory_with_bootloader.ld defines the OS (ThreadX or FreeRTOS) start location. The same definitions are exist for bootloader only built as well.


              User applications are started with a specific thread started on OS where the "application_start(...)" is called.


              The DCT is just a data storage where WiFi and other specific data structures are stored. There are two DCTs. Updated DCT could be altered by the factory default DCT values as well. You may take a look at Switching from WiFi Client To AP Mode for switching from AP to client mode by updating the DCT with factory default.


              Hope it helps.