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] [March 2008 Threads] StackPosted by Oren La on March 17, 2008 Hello
I read the the documents about FreeRTOS and i have a some questions concerning the stack.
I saw that when i call to : xTaskCreate(...) i have to give it a stack depth parameter. - What will be saved in this stack? - Is it true that this stack is create by memory allocation? - In a context switch the regs,flags,... will be saved to the stack, how this RTOS handle and position this data to every task?
Thanks
RE: StackPosted by Dave on March 17, 2008 The stack used by the task is just like any stack used in a C program. There is nothing special or different about it.
RE: StackPosted by Oren La on March 17, 2008 So why do i need the stack depth parameter?
RE: StackPosted by JMR on March 18, 2008 You need to specify the stack size for each task so that the OS can reserve this amount from the available heap memory. The compiler only knows about stack pointer it doesn't do any per task stack allocation. This is done by the RTOS, which doesn't know how much memory a particular task will require during runtime...
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|