2021-10-25 10:01 PM
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
2021-10-25 10:30 PM
Maybe better is show code and explain how you read from compiled code what is local and what global.
2021-10-25 11:02 PM
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.
2021-10-26 01:39 AM
@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?
2021-10-26 02:17 AM
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 ...