On Mon, Apr 2, 2018, at 4:42 PM, markus wrote: > On Mon, 02 Apr 2018 14:16:54 -0300 > Fabio Utzig <ut...@apache.org> wrote: > > > Both > > > > hw/mcu/stm/stm32f7xx/stm32f767.ld > > hw/mcu/stm/stm32f4xx/stm32f407.ld > > > > already define the stack on CCM (called DTCM on the F7xx). Am I > > missing something here? > > It might be me who's missing something (most likely scenario). The > linker scripts do indeed define the DTCM and CCM memory regions and > gives them names, ".stack" and ".data.core" depending on the linker > script. What I'm missing is that those sections aren't used anywhere in > the code. > > The stacks for (main/idle) tasks are defined by OS_TASK_STACK_DEFINE in > os_task.h, which sets the alignment but not the section. Looking at the > generated memory map from an stm32f7 app all the sections are there but > I cannot identify anything actually placed in there. > > But then the linker has always been a bit of a dark art to me so I > might just not be looking at the right things, or properly interpret > what I'm seeing.
Ah, I see what you mean now, seems correct. Beyond main/idle it lso applies to any task for which the stack was allocated with malloc.