2021-04-26 10:50 PM
I use IAR to program STM32,the map file shows that :the RAM is divided to 1.data Section;2.CSTACK and HEAP section;3.bss section;4.Unassigned part of the RAM。
What I want to know is that:The Unassigned part of the RAM is used to do what? Because I want to expand the size of CSTACK ;but I am afraid of that ,too small of the uninitialized memory area size(the size of 4) will cause some wrongs.
Thanks.
2021-04-26 11:20 PM
> The Unassigned part of the RAM is used to do what?
Nothing.
Your application does not need and use it.
Declare (and use) more variables, and the size will reduce.
>I want to expand the size of CSTACK ;but I am afraid of that ,too small of the uninitialized memory area size(the size of 4) will cause some wrongs.
Too small of a stack will definitely cause you trouble.
Determining the required stack size is not an exact science, toolchains are often quite bad at it, or forgo it for a fixed value.
The only additional requirement is, all the mentioned sections must fit into the RAM.
If not, the linker will tell you.
2021-04-26 11:27 PM
Thanks very much.Your answer helps me much