FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [July 2017 Threads]
Hi,
I am trying to learn FreeRTOS on Zynq platform. I have created a project by modifiying the example project found in FreeRTOS. My project uses FreeRTOS 9.0.0.
I have some difficulties understanding stacks and heap.. I created standalone SDK project and added source files of FreeRTOS with my files. When I click on linkerscript, there are two fields: Stack Size and Heap Size.
As far as I understand this stack size isn't related to the stack size parameter given in xTaskCreate(). When a task is created, its stack is allocated from the heap. But this heap is different from the heap mentioned in linker script. I am using heap_4.c as in example project and as heap region, an array is allocated by FreeRTOS.
So, how the sizes given in linker script are used?
The stack size in the linker script will be the stack given to the 'main' program (what runs pre-scheduler) and will be reused as the interrupt stack when the scheduler starts.
The heap size in the linker script will be the amount of heap available via the standard C malloc function (as opposed to the heap that heap4.c provides)
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.