Graphics Library

jarielmar wrote on Thursday, March 05, 2009:

    I want to use Microchip Graphics Library with FreeRTOS.
    Each objet created with the library need a heap and a fixe RAM memory.
    What must I do with the RAM memory needed by the library. Must I add the total memory (fixed and heap)
to configuration Heap memory of the FreeRTOS ?. What about the memory of the task where I call the graphic function
to redraw the objet created by the library?.

    Thank in avanced.

rtel wrote on Friday, March 06, 2009:

The easiest thing to do might be to use heap_3.c with FreeRTOS - that way both FreeRTOS and the graphics library will be mallocing RAM from the same heap segment.


jarielmar wrote on Friday, March 06, 2009:

Thanks you Richard one more question

if I use heap_3.c Where must I define the Heap for the  whole program: in build option  (linker parameter) or in the configTOTAL_HEAP_SIZE parameter of FreeRTOS?

jarielmar wrote on Friday, March 06, 2009:

    In the help I found that for use heap_3.c its  size must be define in the linker option but What about Stack Size of the microcontroller?.
    Must it be defined in the linker option?.
   How FreeRTOS works with this stack?.

Thank in avanced

edwards3 wrote on Friday, March 06, 2009:

You are correct that configTOTAL_HEAP_SIZE has no effect when heap_3 is used so it is setup by the linker options. You  must also define a stack that is used by main(). Once the scheduler is started only the tasks stacks are used. The task stacks are dynamically allocated when the task is created.