cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429ZI SRAM ISSUE - local variable address assigns over global variables

ADank.2
Associate II

I am using local buffer of large size (60KB). The address assigning to this local variable is of global variable. So my program is not working properly. I had implemented TFTP using LWIP. So how LWIP is utilizing SRAM is not understandable. If anyone has solution please let me know...

Thanks ,

Anagha

4 REPLIES 4
MM..1
Chief II

Maybe better is show code and explain how you read from compiled code what is local and what global.

The local variables are on the stack. If that isn't large enough to hold all the auto variables it will crash into the heap and statics.

Consider other means to allocate large buffers.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Andrew Neil
Evangelist III

@ADank.2​ "I am using local buffer of large size (60KB)"

:o

So, as @Community member​ says, your stack will need to be at least 60K - is it?

"how LWIP is utilizing SRAM is not understandable"

Does its documentation not cover this?

MM..1
Chief II

IDE linker standart is

/* Specify the memory areas */
MEMORY
{
RAM (xrw)      : ORIGIN = 0x20000000, LENGTH = 192K
CCMRAM (rw)      : ORIGIN = 0x10000000, LENGTH = 64K
FLASH (rx)      : ORIGIN = 0x8008000, LENGTH = 2016K
}

when your code is over RAM you can use for local CCMRAM part...

As writed above stack plus globals need fit 192K ...