Does the RT1050 EVK work with the FreeRTOS Heap Usage plugin in MUCXpresso 10.2.0?
I have tired to view the heap usage for FreeRTOS using the FreeRTOS plugin, but it always gives an error. The Task List, Timers and Queue plugins work as expected. I have tried different Heap configurations (1 thru 5), but they all show an error for the Heap usage plugin. Has anyone been able to get this to work for the RT1050-EVK?
This issue should be resolved in a new version of the FreeRTOS TAD that will ship in an MCUXpresso IDE maintenance release that we expect to make around the end of this month.
Regards,
MCUXpresso IDE Support
I downloaded and installed MCUXpresso IDE v10.2.1 [Build 795] [2018-07-25]
The HEAP plugin still does not work. I have the heap set to 4, but the plugin thinks it is 3. Here is the Console Log.
16:25:04.973 INFO: [Benchmark] Loading data for "Heap Usage" has started.
16:25:04.983 ERROR: [TadFactory] Reading exception during: "readIntVariableSafely(xHeapStructSize)"
16:25:04.993 INFO: [HeapFactory] Heap type (memory allocation scheme) has been identified from FreeRTOSDebugConfig structure (FreeRTOSDebugConfig[5]) as Heap type #3.
16:25:04.999 INFO: [Benchmark] Loading data for "Heap Usage" took 26 ms.
Should it be fixed in this release?
Hi Andrew,
what value do you have set in freertos_tasks_c_additions.h?
I hope this helps,
Erich
Erich,
That fixed it - thank you!
Not sure why the memory scheme can be configured in so many different places.
Andrew
We've now replicated similar problems, and are investigating further. We'll report back once we understand what is happening.
Regards,
MCUXpresso IDE Support
Any update on when issue?
The basics of how the Heap Usage View determines the used memory scheme (heap type) are described in the MCUXpresso IDE v10.2 FreeRTOS Debug Guide, section 3.5.1 "Memory Scheme in Use".
But basically TAD firstly checks FreeRTOSDebugConfig structure and looks for configFRTOS_MEMORY_SCHEME. If structure is not found, then TAD looks for user defined variable freeRTOSMemoryScheme.
Otherwise (and we will add the additional details below to a future version of the guide) TAD tries to detect heap type from available FreeRTOS variables using this truth table:
Heap Type | ucHeap | xHeapStructSize | heapSTRUCT_SIZE | xHeapRegions |
---|---|---|---|---|
1 | 1 | 0 | 0 | 0 |
2 | 1 | 0 | 1 | 0 |
3 | 0 | 0 | 0 | 0 |
4 | 1 | 1 | 0 | 0 |
5 | 0 | 1 | 0 | 1 |
Regards,
MCUXpresso IDE Support
I am using freeRTOSMemoryScheme to define the heap type, but TAD seems to be ignoring it and always says the heap is detected as type 1. Any suggestions?
I pulled this from the Console Log
13:25:21.583 INFO: [Benchmark] Loading data for "Heap Usage" has started.
13:25:21.593 ERROR: [TadFactory] Reading exception during: "readIntVariableSafely(xHeapStructSize)"
13:25:21.601 INFO: [HeapFactory] Heap type (memory allocation scheme) has been identified from FreeRTOSDebugConfig structure as Heap type #3.
13:25:21.601 INFO: [HeapFactory] Heap variable ucHeap is equal to "0x20213d40".
13:25:22.605 INFO: [Benchmark] Loading data for "Heap Usage" took 1022 ms.
So the problem seems to be in reading xHeapStructSize ...
Any suggestions?
Hello Andrew McCartney ,
Could you please take a screenshot to show the error message, thanks.
BR
Alice
Here you go. I configured my application to use heap 5.
Hello Andrew,
If you use heap 5 , you need fill memory areas into a array,
static HeapRegion_t xHeapRegions[] =
{
{ &heap_sram_lower[0], sizeof(heap_sram_lower) },
{ &heap_sram_upper[0], sizeof(heap_sram_upper)},
{ NULL, 0 } // << Terminates the array.
};
then pass the array into vPortDefineHeapRegions().
vPortDefineHeapRegions(xHeapRegions);
About the detail introduction , please have a look at this thread:
Using Multiple Memory Regions with the FreeRTOS Heap | MCU on Eclipse
Hope it helps,
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
That's all fine, but I get an error no matter what heap type I use. Here is the error I get if I try and use Heap 3.
For some reason the tools thinks I am using heap 1, even though I explicitly set heap 3. The same thing happens if I try heap 2. Why does it think I the project is heap 1?
If I set the heap to type 1, then I get this error.
Please explain what i need to do to get the Heap Usage plugin to work.