Skip to main content
matthias2
Associate II
Sep 13, 2013 9:39 AM UTC
Question

Help needed to layout stack and heap on a STM32 F0

Posted on September 13, 2013 at 11:39

Hi,

I'm doing my first project with the STM32F051x8. Yesterday may code was not running in cause of heap problems.

I played around with the 'startup_stm32f0xx.s' file, set different sizes for Stack_Size, HeapSize.

Can anyone explain to me where Stack and Heap is placed too?

What are the limits for Heap_Size and Stack_Size?

Thanks

Matt
    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    Sep 13, 2013 11:03 AM UTC
    Posted on September 13, 2013 at 13:03

    Using Keil?

    To see where they are placed, look at the .MAP file, typically they are place at the end-of-ram consumed by your other statically allocated variables. The limitation on combined size of statics + heap + stack is thus you available RAM (often IRAM1 per the Target Pane under options, or Scatter File)
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    matthias2
    matthias2Author
    Associate II
    Sep 13, 2013 2:16 PM UTC
    Posted on September 13, 2013 at 16:16

    Yes, I'm using Keil.

    Thanks for the help. Code is now running.