Heap memory blocks are not displayed

cancel
Showing results for 
Search instead for 
Did you mean: 

Heap memory blocks are not displayed

Jump to solution
186 Views
asiertapiazulai
Contributor III

I am testing FreeRTOS on an LPCXpresso board:

  • Board: LPCXpresso LPC1769 (rev. C)
  • IDE: MCUXpresso 11.2.1 [Build 4149] (2020-10-07)
  • Library: LPCOpen v2.10 [2014-12-03]
  • Operating system: FreeRTOS 10.4.1

I have followed the "MCUXpresso IDE FreeRTOS Debug Guide" (Rev. 11.2.0 — 7 October, 2020) instructions.

My problem is that the heap usage view does not show information about the heap memory blocks:

heap.png

The configRECORD_STACK_HIGH_ADDRESS macro is set to 1 in FreeRTOSConfig.h and, as you can see in the task list, the debugger knows the start and end addresses of the stack (which I don't know if it is related, but I suppose it is).

I define the used memory scheme (heap type) with the configFRTOS_MEMORY_SCHEME macro and as you can see it detects it fine (I'm using heap_1.c). But no information about memory blocks is displayed. Somebody could help me?

Thanks a lot,

Asier.

1 Solution
160 Views
ErichS
Senior Contributor II

Hi @asiertapiazulai ,

configRECORD_STACK_HIGH_ADDRESS has nothing to do with this..

That there are no details is expected because of using FreeRTOS Heap 1 (see https://mcuoneclipse.com/2017/03/18/better-freertos-debugging-in-eclipse/). In simple words: with scheme 1 there is no list of memory blocks, and as such the debugger cannot show them. So this is perfectly fine.

I hope this helps,

Erich

View solution in original post

2 Replies
161 Views
ErichS
Senior Contributor II

Hi @asiertapiazulai ,

configRECORD_STACK_HIGH_ADDRESS has nothing to do with this..

That there are no details is expected because of using FreeRTOS Heap 1 (see https://mcuoneclipse.com/2017/03/18/better-freertos-debugging-in-eclipse/). In simple words: with scheme 1 there is no list of memory blocks, and as such the debugger cannot show them. So this is perfectly fine.

I hope this helps,

Erich

View solution in original post

151 Views
asiertapiazulai
Contributor III

That helps a lot, @ErichS . Changing heap_1.c to heap_4.c and setting the configFRTOS_MEMORY_SCHEME macro to 4:

heap_solved.png

It is logical: if the tasks are not going to be deleted there is no need for heap_1 to know the addresses of each block. However, heap_4 must know them, in case memory has to be freed. In fact, in the two images it can be seen that with heap_4 more heap has been used; I suppose that, precisely, it is due to the information stored about the memory blocks.

I have to admit, Erich, that I am a bit embarrassed. I must have read that mcuoneclipse page at least a dozen times, but I couldn't remember that detail. I think, anyway, that it would cost nothing to include those details in the "MCUXpresso IDE FreeRTOS
Debug Guide "- just because it's logical doesn't mean it's obvious.

Thank you very much, once again, Erich.

Asier.