MSP430 RAM requirements

Hi! First of all, I’m new to FreeRTOS and want to see if it is suitable for the device I have available. I’m using a MSP430F5529. There is only 8K RAM on this device and I would like to know how well FreeRTOS can operate with this small amount of RAM.
As an example, I would like to have 5 LEDs that are each toggled by a task. These task should be preemptive and have different priorities.
What would be the RAM overhead per task for this example? How much total RAM would be used? Is there a way to save memory by e.g. having the same memory context? Thanks in advance!

MSP430 RAM requirements

The configMINIMAL_STACK_SIZE setting in the official MSP430X port is set to either 80 words or 110 words, depending on the data model.  So each task will take a minimum of 220 bytes for its stack, plus another 30 or 40 bytes for its TCB.  The scheduler itself will take about 200 bytes. Regards.

MSP430 RAM requirements

Thanks! This helps!

MSP430 RAM requirements

Hi Richard,
i have a question about the needed memory for the queues. -does a queue need memory only on RAM or it needs space in the flash-memory too?
-is the needed place in RAM-memory a part of the stack of some tasks, or did a queue get a separate RAM-place, when i create it bevor the scheduler start to run. i am using the MSP430 too. thank you for your efforts.
Regards.

MSP430 RAM requirements

i forget to ask this too.
i would like to ask about the needed memory for a queue too.

MSP430 RAM requirements

RAM comes from the FreeRTOS heap. http://www.freertos.org/a00111.html The amount of ROM space the queue code takes does not get more the more queues you create.

MSP430 RAM requirements

hi davedoors,
yes i know this, about RAM and FreeRTOS heap. my questions is: how much memory space (in RAM-which is here FreeRTOS heap) will be needed for a queue? beside the actually storage space for the queue-elements, that i can calculate manualy. and if these memory space for queue (or semaphors) is independent from the memory stacks of the tasks.? 

MSP430 RAM requirements

and about the ROM, that means a queue will get pnly memory space from the RAM ( FreeRTOS heap ). right.?

MSP430 RAM requirements

my questions is: how much memory space (in RAM-which is here FreeRTOS heap) will be needed for a queue
If you look in queue.c, in the function that creates the queue, you will see the queue structure being allocated, and the queue storage space being allocated. The queue structure is sizeof( struct QueueDefinition ) (or sizeof( xQUEUE) in the code, but that will only work inside queue.c). It is not allocated on a task stack. There is no way it could be allocated on a task stack, otherwise it would not exist when the function that created the queue returned.
and about the ROM, that means a queue will get pnly memory space from the RA
How would a queue get memory from ROM?

MSP430 RAM requirements

thank you for your answers. i ment that, the only memory space that is required for the queue is in the RAM and queue dont get memory space in ROM.
but your answer did already explain these too. thank you.