I have been trying for using FreeRTOS Task Aware Debug features for the example project "lwip_httpssrv_mbedTLS_freertos" in SDK. During debugging of this code while trying to examine the Task List, Queue List, Timer List and Heap Usage from FreeRTOS menu option, none of these items is visible! The Information message "FreeRTOS has not been detected." is displayed in the FreeRTOS TAD Views section.
IDE Debug mode is All-stop and other care has been taken as described in MCUXpresso_IDE_FreeRTOS_Debug_Guide.pdf.
For other SDK examples for FreeRTOS, there are no issues for FreeRTOS Task Aware Debug.
I would like to know is there any specific settings missing for "lwip_httpssrv_mbedTLS_freertos" project example in achieving FreeRTOS Task Aware Debug views?
Hi all,
I have the same problem, what could be cause of the problem?
No, other modules should not affect it. Most common cause is the removal of the struct in freertos_tasks_c_additions.h.
Can you check your linker map file if the array FreeRTOSDebugConfig[] is still present and linked with the application and not removed?
I have verified for FreeRTOSDebugConfig[] in the linker map file.
.rodata 0x0004f4a4 0x1c ./freertos/freertos_kernel/tasks.o
0x0004f4a4 portArch_Name
0x0004f4a8 FreeRTOSDebugConfig
can you check what the console output for TAD is?
Have you turned on LTO in the linker?
Check if pxReadyTaskList is present in your linker map file to be sure.
What I have is this in tasks.c (around line 360):
/* Lists for ready and blocked tasks. --------------------
* xDelayedTaskList1 and xDelayedTaskList2 could be move to function scople but
* doing so breaks some kernel aware debuggers and debuggers that rely on removing
* the static qualifier. */
#if configLTO_HELPER /* << EST */
/* If using -lto (Link Time Optimization), the linker might replace/remove the names of the following variables.
* If using a FreeRTOS Kernel aware debugger (e.g. Segger FreeRTOS task aware plugin), then the debugger won't be able to see the symbols and will fail.
* Therefore (more as of a hack) the symbols are defined with external linkage, even if not used from other modules.
* See https://mcuoneclipse.com/2017/07/27/troubleshooting-tips-for-freertos-thread-aware-debugging-in-eclipse/
*/
PRIVILEGED_DATA /*static*/ List_t pxReadyTasksLists[ configMAX_PRIORITIES ];/*< Prioritised ready tasks. */
PRIVILEGED_DATA /*static*/ List_t xDelayedTaskList1; /*< Delayed tasks. */
PRIVILEGED_DATA /*static*/ List_t xDelayedTaskList2; /*< Delayed tasks (two lists are used - one for delays that have overflowed the current tick count. */
PRIVILEGED_DATA /*static*/ List_t * volatile pxDelayedTaskList; /*< Points to the delayed task list currently being used. */
PRIVILEGED_DATA /*static*/ List_t * volatile pxOverflowDelayedTaskList; /*< Points to the delayed task list currently being used to hold tasks that have overflowed the current tick count. */
PRIVILEGED_DATA /*static*/ List_t xPendingReadyList; /*< Tasks that have been readied while the scheduler was suspended. They will be moved to the ready list when the scheduler is resumed. */
#else
PRIVILEGED_DATA static List_t pxReadyTasksLists[ configMAX_PRIORITIES ];/*< Prioritised ready tasks. */
PRIVILEGED_DATA static List_t xDelayedTaskList1; /*< Delayed tasks. */
PRIVILEGED_DATA static List_t xDelayedTaskList2; /*< Delayed tasks (two lists are used - one for delays that have overflowed the current tick count. */
PRIVILEGED_DATA static List_t * volatile pxDelayedTaskList; /*< Points to the delayed task list currently being used. */
PRIVILEGED_DATA static List_t * volatile pxOverflowDelayedTaskList; /*< Points to the delayed task list currently being used to hold tasks that have overflowed the current tick count. */
PRIVILEGED_DATA static List_t xPendingReadyList; /*< Tasks that have been readied while the scheduler was suspended. They will be moved to the ready list when the scheduler is resumed. */
#endif
Basically as noted in the comment and if I want to use LTO or other aggressive optimizations, I use external linkage declarations and not static ones.
I hope this helps,
Erich
I have checked for pxReadyTaskList in linker map file. It is not present.
LTO is not turned ON in linker settings.
If I turn it ON, I am getting errors during compilation.
What debug connection/probe are you using?
https://mcuoneclipse.com/2017/07/27/troubleshooting-tips-for-freertos-thread-aware-debugging-in-ecli... provides some check points.
I hope this helps,
Erich
The 'all-stop' mode is relevant to the thread-awareness in the 'Debug' view only.
If it cannot show things in the other views, then most likely the IDE does not find the necessary symbols in the application. There could be several reasons for this, including the compiler removing some unused symbols.
That may be the case.
I have taken care for the guidelines in the following link.
Troubleshooting Tips for FreeRTOS Thread Aware Debugging in Eclipse - DZone IoT
The optimization level is None in my project setting.
Are there any chances that since the project is configured for mbedTLS in SDK, it may be affecting for TAD?