Skip to main content
Pzhu.1
Associate II
April 27, 2021
Question

Data in the RAM of STM32

  • April 27, 2021
  • 1 reply
  • 1941 views

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.

0693W00000AMb31QAD.png 

    This topic has been closed for replies.

    1 reply

    Ozone
    Principal
    April 27, 2021

    > 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.

    Pzhu.1
    Pzhu.1Author
    Associate II
    April 27, 2021

    Thanks very much.Your answer helps me much