After I yesterday rise a false alarm about "Bug in FreeRTOS" now I want to refresh my knowledge about FreeRTOS and memory organization.
Please, help me and tell me answer for following questions:
1) heap - what is it?? I though that is kind of stack :). It’s divided between all task (each task has its own stac, but all the stacks are on heap), and it’s also used by queues and semaphores.
2) where is the heap?? I had though that heap is a part of normal stack so in linker script I should give enough space for stack. But I had no idea what kind of stack it should be (User Mode, Supervisor Mode, maybe IRQ Mode??) No I think that heap is kept in the “normal ram” (bss_section) like a regular variable. Is it OK?
3) Is freeRTOS using regular stack?? I think that it use “regular stack” but only in ISR and in kernel-function. It uses a supervisor mode’s stack ind IRQ mode’s stack (sometimes FIQ). Tasks have their own stacks on heap and their don’t use the stack defined in bss_sectrion in linker script. It means that stack size typically could be smaller than heap size. Is it OK??
4) What does author mean when writing paragraph Stack Overflow Detection on freertos.org site (User Documentation \ Configuration \ Stack Overflow Detection)? I think that is about overflowing task’s specific stack which really is on the heap, not in the regular stack. Is it true?
Thanks for explanations :)…