Stack size calculation

mrozojestwporzo wrote on Wednesday, 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 

rtel wrote on Wednesday, 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.

mrozojestwporzo wrote on Wednesday, 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.

mrozojestwporzo wrote on Sunday, 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

davedoors wrote on Sunday, July 24, 2011:

This is not a FatFS support forum.

mrozojestwporzo wrote on Sunday, July 24, 2011:

But it’s still  FreeRTOS support forum.