cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed to layout stack and heap on a STM32 F0

matthias2
Associate II
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
2 REPLIES 2
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
Up vote any posts that you find helpful, it shows what's working..
matthias2
Associate II
Posted on September 13, 2013 at 16:16

Yes, I'm using Keil.

Thanks for the help. Code is now running.