STM32F429ZI SRAM ISSUE - local variable address assigns over global variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
- Labels:
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-26 1: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?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-26 2: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 ...
