Hello, I want to track boundaries for Heap and Stack in my RAM, I tried reading .axf file using 'readelf' but unable to find.
Please find screenshot of readelf output and memory map of MCU arm cortex m4 in below links.
https://ibb.co/ctmtvcS https://ibb.co/98fh6z5
Thanks
You're going to need to look at the exported symbols, not the sections in the .ELF/AXF file Perhaps review the .MAP file, where the linker tells you where it put stuff. You define the stack/heap size in the startup_stm32xxx.s file
EXPORT Stack_Size EXPORT Stack_Mem Stack_Size EQU 0x1000 AREA STACK, NOINIT, READWRITE, ALIGN=3 Stack_Mem SPACE Stack_Size __initial_sp ... Heap_Size EQU 0x200 AREA HEAP, NOINIT, READWRITE, ALIGN=3 __heap_base Heap_Mem SPACE Heap_Size __heap_limit
You could export the heap base/size. You could walk the allocation structures. You can dynamically check the maximal stack depth
In my .map file I can't find combined allocated address for heap and stack. Any help.
So can you find them separately?
Can you find the symbols mentioned in Westonsupermare's post?
Have you studied the documents I posted earlier?
Have you tried searching? eg, searching for "keil linker map file" found this:
http://www.keil.com/forum/63417/map-file/ - which gives several references about the Map file ...
View all questions in Keil forum