2016-07-08 12:44 AM
Hi guys:
I've alredy checked the .map file. I found the twoSTACK 0x2000c170 Section 2304 startup_stm32f10x_cl.o(STACK)
__initial_sp 0x2000ca70 Data 0 startup_stm32f10x_cl.o(STACK)
And i have the questions below:
Is the range of stack address from 0x200ca70-0x200c170? and if the initial stack address if 0x200caDoes that mean every time we used one byte of stack,the sp will - 1?
and Does this also mean our total usage of SRAM is 0xca79 (51824/1024 ≈ 50K)
2016-07-08 03:35 AM
Yes, it means your RAM and heap allocations take up 50K, or so
The stack descends downward 4 bytes (32-bit word) at a time. The SP decrements by 4, and then the register is written to the new location. ie if SP = 0x20001000 the first word would get written at 0x20000FFCThe .MAP shows the base of the stack section, its length, and a pointer to the end of the section/region