Does the RT1050 EVK work with the FreeRTOS Heap Usage plugin in MUCXpresso 10.2.0?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does the RT1050 EVK work with the FreeRTOS Heap Usage plugin in MUCXpresso 10.2.0?

3,351 Views
andrewmccartney
Contributor III

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?

Tags (2)
0 Kudos
13 Replies

2,806 Views
lpcxpresso_supp
NXP Employee
NXP Employee

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

0 Kudos

2,806 Views
andrewmccartney
Contributor III

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?

0 Kudos

2,806 Views
BlackNight
NXP Employee
NXP Employee

Hi Andrew,

what value do you have set in freertos_tasks_c_additions.h?

pastedImage_1.png

I hope this helps,

Erich

0 Kudos

2,806 Views
andrewmccartney
Contributor III

Erich,

That fixed it - thank you!

Not sure why the memory scheme can be configured in so many different places.

Andrew

0 Kudos

2,806 Views
lpcxpresso_supp
NXP Employee
NXP Employee

We've now replicated similar problems, and are investigating further. We'll report back once we understand what is happening.

Regards,

MCUXpresso IDE Support

0 Kudos

2,806 Views
andrewmccartney
Contributor III

Any update on when issue?

0 Kudos

2,806 Views
lpcxpresso_supp
NXP Employee
NXP Employee

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 TypeucHeapxHeapStructSizeheapSTRUCT_SIZExHeapRegions
11000
21010
30000
41100
50101

Regards,

MCUXpresso IDE Support

0 Kudos

2,806 Views
andrewmccartney
Contributor III

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?

0 Kudos

2,806 Views
andrewmccartney
Contributor III

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?

0 Kudos

2,806 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Andrew McCartney ,

Could you please take a screenshot to show the error message, thanks.

BR

Alice

0 Kudos

2,806 Views
andrewmccartney
Contributor III

Here you go. I configured my application to use heap 5.

HEAP error.jpeg

0 Kudos

2,806 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

2,806 Views
andrewmccartney
Contributor III

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.Heap3.jpeg

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.

Heap1.jpeg

Please explain what i need to do to get the Heap Usage plugin to work.

0 Kudos