Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

Stack size calculation

Posted by buka86 on July 20, 2011
Hi,
I was wandering how to calculate a stack size for a particular task ? I have also question about licence. What does it mean "Do I have to open source my application code that makes use of the FreeRTOS services? --->>
No, as long as the code provides functionality that is distinct from that provided by FreeRTOS ". Because I want to use FreeRTOS in our company (we do not redistribute our code to nobody ), so it is legal to use FreeRTOS ?

Thanks

RE: Stack size calculation

Posted by Richard on July 20, 2011
“I was wandering how to calculate a stack size for a particular task ?”


That is not really a FreeRTOS question. You would calculate the stack size in exactly the same way you would for any other C program (what is the maximum function call depth, what is placed on the stack by your application when at the maximum call depth, etc.). What FreeRTOS does do, however, is provide tools that will tell you how close the stack has ever come to overflowing (the stack "high water mark"), so you have data you can use to adjust the stack accordingly to avoid RAM being wasted.

“What does it mean "Do I have to open source my application code that makes use of the FreeRTOS services? --->>
No, as long as the code provides functionality that is distinct from that provided by FreeRTOS ”


I'm not sure I can put it more succinctly than the table on this page: http://www.freertos.org/a00114.html If your application makes use of FreeRTOS through its API but is not itself anything to do with implementing multitasking, then your application can be closed source, and only the kernel is open source. If you modify the kernel or add extra multitasking features to the existing kernel, then your modifications remain open source because they are in effect part of the kernel, but your application that uses the kernel still remains closed source.

Regards.

RE: Stack size calculation

Posted by buka86 on July 20, 2011
Hi.
I knew the "high water mark" function, but you helped me a lot with my FreeRTOS licence confusions. Thank you.

Regards.

RE: Stack size calculation

Posted by buka86 on July 24, 2011
Hi,
I have next question this time about fatfs libraries http://elm-chan.org/fsw/ff/00index_e.html . I'm confused because I'm trying to create file and save data to it, and when I do this in main function it works, and when I put the same code to the task function it won't. Maybe it's caused by lack of resources ? I'm using Atmega 128. How big should be a stack for task like this? Maybe someone who have experience with fatfs could help me.

Regards

RE: Stack size calculation

Posted by Dave on July 24, 2011
This is not a FatFS support forum.

RE: Stack size calculation

Posted by buka86 on July 24, 2011
But it's still FreeRTOS support forum.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner