Hi,
Thank you very much for support and prompt reply.
I have created and tested few task successfully, but when I increased the number of task I am getting the below error.
errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY
I guess the required memory for all task is not sufficient.
At the initialization of first task the when “pvPortMalloc” gets call the xFreeBytesRemaining = 8184 as shown in fig, which gets reduced on each task initialization.
Can you please explain me the issue and its best possible solution?
when I just commented few of the task initialization it get stuck at
Any chance to increase configTOTAL_HEAP_SIZE in your FreeRTOSConfig.h accordingly (if you have enough RAM available) ? BTW you should also tell which heap implementation you’re using e.g. FreeRTOS heap_4.c.
Did you define configASSERT , enable stack overflow checking and maybe also configUSE_MALLOC_FAILED_HOOK along with an implementation of vApplicationMallocFailedHook for development/debugging ?
Its default heap size. #define configTOTAL_HEAP_SIZE ( ( size_t ) 8192 )
os_heap_c is in use I hope this is what you wanted to know. In which kernekHeap is defined as below. #pragma DATA_SECTION(ucHeap, “.kernelHEAP”)
That looks like it is based of a really old version of heap_2.c. It has been modified to add in the #pragma you reference a few posts up. Did you put that in? In any case it looks like its intended to enable placing the heap at a location specified in a linker script. It still uses configTOTAL_HEAP_SIZE to dimension the heap.
Can I replaced it with any heap_x.c without any modification?
What is the max limit to configure total heap size? Can I put it as 50000? #define configTOTAL_HEAP_SIZE ( ( size_t ) 8192 )
You should be able to switch to heap_4.c, but that won’t have the modification to get placed by the linker. The only limit on the heap size is the amount of RAM you have available.