Hi,
I'm using the MCUXpresso FreeRTOS SDK and switched over to the Heap 5 memory allocation scheme in order to use both memory regions on the MK22FN1M0VLK12 I'm using (64kB + 64kB).
However, I can no longer accurately analyse how the heap is being used as the Heap Usage table shows blocks that are not part of the heap and it is preventing the green/red bar visualisation from displaying properly.
I am getting a ~500MB block of memory being reported.
How can I fix this?
Thanks
解決済! 解決策の投稿を見る。
As previously stated, we are investigating this issue with the FreeRTOS TAD view. Hopefully we can incorporate a fix in the next IDE release.
Regards,
MCUXpresso IDE Support
I now have a new problem...
I have updated to MCUX 10.2 and SDK2.3.1 (latest available for my chip).
I created a new project from scratch and placed my source in it, ensured that I followed the MCUX FreeRTOS Debug guide again and now I get the error shown in the screenshot:
Hi Mike,
I have the same problem, just reported to Erich: see the posts above.
Many thanks
Biafra
In any case: if using FreeRTOS memory scheme 5, then the memory areas have to be in the array named xHeapRegions .
Because this is the symbol the plugin is looking for.
As used in the following example:
mcuoneclipse/FRDM-K64F_FreeRTOS_Heap5.c at master · GitHub
I hope this helps,
Erich
Hi BlackNight,
I reproduced the error, please read this post: https://community.nxp.com/message/1018070?commentID=1018070#comment-1018649.
Many thanks,
Biafra
I was not able to reproduce it.
I tried to replicate it with a K64 (as I don't have a K66).
Your screenshots show to me that if you want to display the RTOS data while the data is inconsistent (not all information stored), then I'm not surprised that the TAD might show no data because the Kernel did not save all the data. This is what I see in your first screenshot.
And for the last screenshot: the memory heap/regions can only be shown correctly after vPortDefineHeapRegions() which is expected for me?
I hope this helps,
Erich
Hi BlackNight,
I've just installed the new MCUXpresso 10.2.1 version, coming with TAD 1.0.6: now it works fine.
Many thanks
Biafra
Hi BlackNight,
I've found this error when I tried to access to open the heap view:
It seems that it can't access to some informations it needs.
Many thanks
Biafra
Hi BlackNight,
Just to clarify my situation.
I used two projects: the one that shows the problem is the real application, while the other, correctly displayed, is the test application.
All the screenshots above have been taken after the vPortDefineHeapRegions() function have been executed.
Using both projects, before the execution of the vPortDefineHeapRegions() function, the heap is displayed as in the lower pane of my first screeshot (it shows no data), I think this is the normal behaviour.
Using the test project, immediately after the execution of the vPortDefineHeapRegions() function, the heap is displayed correctly.
Using the real application project, the heap continues showing no data even after the execution of the vPortDefineHeapRegions() function, until the vQueueAddToRegistry() function is executed: from that moment on the error is displayed in the heap pane.
Using the test project, but after I changed the properties to relocate it at the address 0x10000 using a boot loader, the behaviour is the same as using the real application project (the real application starts at address 0x10000 too).
The test project I attached is the one modified to start at address 0x10000.
Maybe the error is related to the relocation process and it can be reproduced even using K64.
Many thanks
Biafra
Hi BlackNight,
I just did some investigations.
This is the situation in my working application before I got the error: in the heap view there is no data, the PC value is 0x00020168, the address of the next instruction to execute.
This is the situation immediately after I got the error (I did step with instruction stepping mode active).
This is the situation in a correctly displayed demo application: it's immediately after the return from the vPortDefineHeapRegions() function, while in the previous application at the same point there was no data in the heap view.
Many thanks
Biafra
Hi Mike,
what version of the FreeRTOS plugin are you using? It seems to me you are using V1.0.1 which indeed had this issue. There is a V1.0.2 availble (update site: http://freescale.com/lgfiles/updates/Eclipse/KDS) which shows correctly for me two heap regions with 64KByte (Setup in MCUXpresso IDE as in Using Multiple Memory Regions with the FreeRTOS Heap | MCU on Eclipse ).
Maybe you can give V1.0.2 a try? The public release mentioned to be expected end of May should come with this (and other fixes too), but until then you could try V1.0.2 plugin.
I hope this helps,
Erich
Hi Erich,
I'm trying the new pulgin version, but it still displays wrong informations:
In the higher pane the sum of free space is not correct and there is not the green bar showing it.
In the lower pane the block size include the non existing space between two different blocks.
Many thanks
Biafra
Hi everyone,
I've just downloaded and installed the latest MCUXpresso 10.2.0 where there is the updated FreeRTOS aware plugin.
Using memory scheme 5, in the heap usage view I get this error:
I've just read the document https://www.nxp.com/docs/en/quick-reference-guide/MCUXpresso_IDE_FreeRTOS_Debug_Guide.pdf and all the steps are correctly done.
What can I do to display the correct informations?
Many thanks
Biafra
Hi Francesco,
could you share your FreeRTOSConfig.h and freertos_tasks_c_additions.h?
Erich
Hi Biafra,
your files look fine.
I believe it could be an include order problem on your side, as I'm not able to replicate this on my end.
Can you change that value below to 5 and give it a try?
Erich
Hi Erich,
I set configFRTOS_MEMORY_SCHEME to 3 in FreeRTOSConfig.h.
In my system in freertos_task_c_additions.h file the lines 75 to 77 are grayed (configFRTOS_MEMORY_SCHEME has already been defined in FreeRTOSConfig.h).
Now I get this error:
Many thanks
Biafra
Hi Biafra,
I was under the impression you are using scheme 5?
I think I would need to see the whole picture. It looks to me something is strang in your setup. Would it be possible that you could share a project to reproduce this? You don't have to include your custom code, just the project with the SDK and FreeRTOS and its configuration?
Erich