Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists