Skip to main content
Manish Sharma
Associate III
December 1, 2017
Question

Allocate Big Stack Size on STM32H743I_Eval Using STM32CubeMX

  • December 1, 2017
  • 1 reply
  • 1185 views
Posted on December 01, 2017 at 13:51

Hi All,

I want to allocate array[2000][160] on STM32H743I_Eval using STM32CubeMx.

Is it possible to allocate stack of this size?

Regards,

Manish

    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    December 1, 2017
    Posted on December 01, 2017 at 17:41

    And what type is this?

    Probably inadvisable, why do you need to do this as a local/auto variable? Could you use the heap? Preferable not to have the Stack on external memory. The stack or heap can be the entirety of the available memory if you want to do that.

    In Keil Heap and Stack sizes are set in startup_stm32xyz.s

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Manish Sharma
    Associate III
    April 17, 2018
    Posted on April 17, 2018 at 08:45

    Thanks Clive.

    Variable is 'char' type. Though, I could have chosen heap but i want to know that

    1. How can we increase our stack size if there is need to do it ?

    2. How can we segregate and allocate size to 'stack' , 'heap' etc. Basically, How can

       we design our own memory layout in linker script file.

    Regards,

    Manish

    AvaTar
    Senior III
    April 17, 2018
    Posted on April 17, 2018 at 09:30

    Usually done within the toolchain.

    Stack size and heap size are supposedly project properties, not part of the source code itself.