OTA2_SUPPORT on STM32F4xxx

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
GeEs_4724546
Level 1
Level 1
First solution authored 5 replies posted 5 sign-ins

Although ota2 files exist for platform/MCU/STM32F4xx/GCC/STM32F469, I've discovered then read on this site that there is insufficient RAM on the STM family e.g. 384K vs 640K as indicated by the diagram in WICED OTA2 pdf 2.1.2 OTA2 RAM Requirements.

The code size isn't the culprit but the loosing of 200K+ of SRAM.  I tracked it down to:

WICED/platform/MCU/STM32F4xx/GCC/STM32F469/ota2_memory_with_bootloader.ld

/*SRAM             (rwx) : ORIGIN = 0x20000000, LENGTH = 96K*/

SRAM             (rwx) : ORIGIN = 0x20000000, LENGTH = 320K

BTLDR_SRAM       (rwx) : ORIGIN = 0x2004BC00, LENGTH = 17k      /* Boot loader stack at the end. */

/*BTLDR_SRAM       (rwx) : ORIGIN = 0x20010000, LENGTH = 32k      / * Boot loader stack at the end. */

Using the SRAM and BTLDR_SRAM from:
 
WICED\platform\MCU\STM32F4xx\GCC\STM32F469\memory_with_bootloader.ld
 
With this change, the OTA2_SUPPORT version of the build works. 
 
So now I'm tracking down the intended use of this area... perhaps it can be made smaller than the original OTA2 settings.
 
Can someone point me to where in the linker scripts this memory is used and how the application RAM variable maps into it.

 

Thanks!

0 Likes
1 Solution

I was able to run the application with:

SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 136K /* 320K */

I'm using FreeRTOS with WICED's pre-selection of Heap_3.c (gcc malloc) so hard to get a handle on real RAM needs.

I still don't understand what happens to the seemingly unused RAM.

View solution in original post

0 Likes
3 Replies
Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hi,

Could you tell us what is the RAM requirement in your application? 

Thanks

0 Likes

I was able to run the application with:

SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 136K /* 320K */

I'm using FreeRTOS with WICED's pre-selection of Heap_3.c (gcc malloc) so hard to get a handle on real RAM needs.

I still don't understand what happens to the seemingly unused RAM.

0 Likes
GeEs_4724546
Level 1
Level 1
First solution authored 5 replies posted 5 sign-ins

I'm still figuring how to get the whole ota2 stack working... so although my app runs with the larger SRAM LENGTH I still need to understand why WICED is shipped with the  96K value.

0 Likes