Hello 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.
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. Regards.
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?
Hi 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
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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.