FreeRTOS+Trace Error

sindhukrishna wrote on Saturday, November 08, 2014:

I use Hercules Launchpad TMS570LS0432 kit and FreeRTOS v8.1.2, and I use Halcogen for code generation. I tried inserting code for Trace Options available with Tracealyzer from Percepio(FreeRTOS+Trace). After adding the necessary header and source file provided by percepio into the project, code build results in error

error #10099-D: program will not fit into available memory. run placement with alignment fails for section “.kernelHEAP” size 0x2800 . Available memory ranges:
RAM size: 0x6300 unused: 0x1a50 max hole: 0x1a50

The software uses on chip RAM for recording the Trace. Kindly suggest a solution to get rid of this error

rtel wrote on Saturday, November 08, 2014:

So you have to save some RAM from somewhere.

Are you using heap_1, heap_2, heap_3, heap_4 or heap_5.c in the project? (http://www.freertos.org/a00111.html). If you are using heap_3.c then configTOTAL_HEAP_SIZE won’t make any difference. If you are using any of the others then you can tune configTOTAL_HEAP_SIZE so it does not use any more RAM than necessary. Call xPortGetFreeHeapSize() after all the tasks, queues, semaphores, etc. have been allocated to see how much space is left, and reduce configTOTAL_HEAP_SIZE accordingly. Also if you are using anything other than heap_3.c you can set the size of the heap used by the C library to 0 as it is not used by FreeRTOS at all (unless of course it is being used by any of the HalCoGen generated code).

You can also look in the trace configuration file to reduce the size of the buffer used to hold the trace recorder data - there is a #define that sets the buffer size - the header file is well documented so you will find it easy enough (near the top of the config file).

Regards.