2020-03-10 11:55 AM
I am working on FreeRTOS based firmware on a STM32F103 MCU in STM32CubeIDE. I have the NXP Task Aware Debugger installed, which works fine on displaying the Task List info, but the Heap Usage display does not work. It does show the following error after attempting to load the data:
In the TAD log file it shows this message:
"10:35:50.998 INFO: [Benchmark] Loading data for "Heap Usage" has started.
10:35:55.53 INFO: [HeapFactory] TAD will try to determine heap type (memory scheme) from available variables.
Please add "static const uint8_t freeRTOSMemoryScheme = <heap_type_used>;" (or use macro configFRTOS_MEMORY_SCHEME, if defined)
variable into your project for TAD to know which heap type is used.
10:35:55.53 INFO: [FreeRTOS] FreeRTOS macro "configFRTOS_MEMORY_SCHEME" is disabled.
10:35:55.53 INFO: [HeapFactory] Heap variable ucHeap is equal to "0x20000494".
10:35:56.63 INFO: [HeapFactory] Heap type (memory allocation scheme) has been identified from available heap variables as Heap type #1. "
I am using heap 4 and to I have tried adding the macro "#define configFRTOS_MEMORY_SCHEME 4" as well as the variable "static const uint8_t freeRTOSMemoryScheme = 4;" I have tried thsoe one by one and simultaneously. Whatever I try, the error message stay the same and apparently it keeps assuming heap 1 allocation scheme. This is driving me nuts.
I'm sure I'm overlooking something obvious. Can anyone help me out?
Solved! Go to Solution.
2020-03-10 12:51 PM
Of course, after searching for two days, giving up and asking the question here, I spend a few more minutes searching and found the answer. Turns out I needed to set the macro "#define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 1" and add the file "freertos_tasks_c_additions.h" as described here: https://www.nxp.com/docs/en/quick-reference-guide/MCUXpresso_IDE_FreeRTOS_Debug_Guide.pdf
After doing so it works just fine!
2020-03-10 12:51 PM
Of course, after searching for two days, giving up and asking the question here, I spend a few more minutes searching and found the answer. Turns out I needed to set the macro "#define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 1" and add the file "freertos_tasks_c_additions.h" as described here: https://www.nxp.com/docs/en/quick-reference-guide/MCUXpresso_IDE_FreeRTOS_Debug_Guide.pdf
After doing so it works just fine!