We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Dear Sir
I don't uderstand the meaning of stack size in the startup assembler code (stm32),what is for ? I have some confusion because the file is talking about stack tailor :
Amount of memory (in bytes) allocated for Stack Tailor this value to your application needs Stack Configuration
In the case we have FreeRTOS running on ,where the memory of freertos is allocated ,it is depending on the stack tailor size?
Same questions about the heap size(in the startup file)
Thank you
Processor stack is allocated from RAM, just like tasks stacks.
Here is what I can understand:
1- RAM=Stack+heap So in the startup file we reserve space for stack and heap. then freertos reserve his own stack but this time where this is done in the stack part of the RAM or the heap? 2-
RAM=Stack+Heap+memory for freertos
so in this case is logic for me.
So what is a stack processor in this case?
Which scenario is correct?
Your chip has volatile memory (RAM). Some of it is allocated for processor stack. Some of it is allocated for processor heap. Some of it is allocated for operating system stacks. This is merely memory which is not related to the previous two items.
This is merely memory which is not related to the previous two items.
Unless, in the case of FreeRTOS, a memory manager is used that allocates memory from the heap or processor stack. But usually this is not the case.
So,
RAM = processor stack + processor heap + memory for FreeRTOS + more unused RAM (optional).
Wrong.
Stack is stored in RAM. Heap is stored in RAM. Read/Write variables (global, local and parameters) are stored in RAM. ...
A program may use the CRTL (C Runtime Library) heap functions for memory allocation. Or a program may use own code. And that own code may not use any heap declared in the startup file but instead make use of one or more large array variables.
Read this, regarding memory allocations in FreeRTOS.