MCUxpresso: FreeRTOS task and queue list windows empty

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

MCUxpresso: FreeRTOS task and queue list windows empty

Jump to solution
625 Views
davenadler
Senior Contributor II

Problem:

The IDE FreeRTOS-aware windows do not display anything.
At one time this worked fine, and now going back to it a year later nothing shows up.

Context:

  • large FreeRTOS application running on imxRT1024.
  • debug build
  • paused debugger after scheduler is running
  • debugger is working fine, showing all threads (tasks)
  • MCUXpresso IDE v24.9 [Build 25] [2024-09-26] on Windows 10
  • segger J-Link software version V8.12
  • freertos_tasks_c_additions.h added from SDK_2_15_000_MIMXRT1024xxxxx
    also added  __attribute__((used)) to FreeRTOSDebugConfig[] to ensure loading
  • debugger reads FreeRTOSDebugConfig[24] just fine (note size 24)
  • FreeRTOSConfig.h includes:
    #define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 1 // DRN: may be required for FreeRTOS-aware debugger windows??
    #define configGENERATE_RUN_TIME_STATS 0
    #define configUSE_TRACE_FACILITY 1 // legacy trace, prerequisite for configUSE_TRACE_FACILITY
    #define configUSE_STATS_FORMATTING_FUNCTIONS 1 // DRN: may be required for FreeRTOS-aware debugger windows??
  • Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 13.2.1 20231009
  • JLink debugger configuration enables FreeRTOS:
    JLink_debug_cfg.PNG

     

Any help would be greatly appreciated!

Thanks,
Best Regards, Dave

Labels (1)
0 Kudos
Reply
1 Solution
572 Views
davenadler
Senior Contributor II

I got this working by upgrading to SEGGER J-Link V9.22 software.
As always it takes a couple of tries to get something into the FreeRTOS-aware windows (long-standing MCUxpresso bug).

Contrary to some documentation on this site, at least for Segger the freertos_tasks_c_additions.h file is not required.
The relevant FreeRTOSCOnfig settings I'm now using are:

/* Run time and task stats gathering related definitions. */
#define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H  0 // DRN: NOT required for FreeRTOS-aware debugger windows??
#define configGENERATE_RUN_TIME_STATS          0
#define configUSE_TRACE_FACILITY               0 // DRN: NOT required for FreeRTOS-aware debugger windows, prerequisite for vTaskList(), vTaskGetRunTimeStats(), etc.
#define configUSE_STATS_FORMATTING_FUNCTIONS   0 // DRN: NOT required for FreeRTOS-aware debugger windows
#define configENABLE_BACKWARD_COMPATIBILITY     1

 

View solution in original post

0 Kudos
Reply
2 Replies
573 Views
davenadler
Senior Contributor II

I got this working by upgrading to SEGGER J-Link V9.22 software.
As always it takes a couple of tries to get something into the FreeRTOS-aware windows (long-standing MCUxpresso bug).

Contrary to some documentation on this site, at least for Segger the freertos_tasks_c_additions.h file is not required.
The relevant FreeRTOSCOnfig settings I'm now using are:

/* Run time and task stats gathering related definitions. */
#define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H  0 // DRN: NOT required for FreeRTOS-aware debugger windows??
#define configGENERATE_RUN_TIME_STATS          0
#define configUSE_TRACE_FACILITY               0 // DRN: NOT required for FreeRTOS-aware debugger windows, prerequisite for vTaskList(), vTaskGetRunTimeStats(), etc.
#define configUSE_STATS_FORMATTING_FUNCTIONS   0 // DRN: NOT required for FreeRTOS-aware debugger windows
#define configENABLE_BACKWARD_COMPATIBILITY     1

 

0 Kudos
Reply
597 Views
mayliu1
NXP Employee
NXP Employee

Hi @davenadler ,

Thank you so much for your interest in our products and for using our community.

First, I recommend referring to the MCUXpresso IDE FreeRTOS Debug Guide for detailed requirements and configuration steps:

https://www.nxp.com/webapp/Download?colCode=UG10059&appType=license&location=null

Second, regarding your issue, please try the following actions to address the likely root cause:

1: Set configENABLE_BACKWARD_COMPATIBILITY to 0 in FreeRTOSConfig.h

A similar case was reported in the NXP Community, where setting this macro to 0 resolved the problem of an empty FreeRTOS Task List.
Please apply the same fix to test whether it resolves your issue.

Solved: Freertos debug issue - NXP Community

2: Follow the configuration described in Section 4.2 (SEGGER J‑Link probes) of the MCUXpresso IDE 25.06 FreeRTOS Debug Guide

FreeRTOS thread-aware debugging for SEGGER J‑Link is disabled by default, and you must explicitly enable the RTOS plug‑in (GDBServer/RTOSPlugin_FreeRTOS) in your J‑Link Launch Configuration.

Wish it helps you

Best Regards

MayLiu

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2325236%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMCUxpresso%3A%20FreeRTOS%20task%20and%20queue%20list%20windows%20empty%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2325236%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSTRONG%3EProblem%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EThe%20IDE%20FreeRTOS-aware%20windows%20do%20not%20display%20anything.%3CBR%20%2F%3EAt%20one%20time%20this%20worked%20fine%2C%20and%20now%20going%20back%20to%20it%20a%20year%20later%20nothing%20shows%20up.%3C%2FP%3E%3CP%3E%3CSTRONG%3EContext%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CUL%3E%3CLI%3Elarge%20FreeRTOS%20application%20running%20on%20imxRT1024.%3C%2FLI%3E%3CLI%3Edebug%20build%3C%2FLI%3E%3CLI%3Epaused%20debugger%20%3CSTRONG%3E%3CU%3Eafter%3C%2FU%3E%3C%2FSTRONG%3E%20scheduler%20is%20running%3C%2FLI%3E%3CLI%3Edebugger%20is%20working%20fine%2C%20showing%20all%20threads%20(tasks)%3C%2FLI%3E%3CLI%3EMCUXpresso%20IDE%20v24.9%20%5BBuild%2025%5D%20%5B2024-09-26%5D%20on%20Windows%2010%3C%2FLI%3E%3CLI%3Esegger%20J-Link%20software%20version%20V8.12%3C%2FLI%3E%3CLI%3Efreertos_tasks_c_additions.h%20added%20from%20SDK_2_15_000_MIMXRT1024xxxxx%3CBR%20%2F%3Ealso%20added%26nbsp%3B%20__attribute__((used))%20to%20FreeRTOSDebugConfig%5B%5D%20to%20ensure%20loading%3C%2FLI%3E%3CLI%3Edebugger%20reads%26nbsp%3BFreeRTOSDebugConfig%5B24%5D%20just%20fine%20(note%20size%2024)%3C%2FLI%3E%3CLI%3EFreeRTOSConfig.h%20includes%3A%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%223%22%3E%23define%20configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H%201%20%2F%2F%20DRN%3A%20may%20be%20required%20for%20FreeRTOS-aware%20debugger%20windows%3F%3F%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%223%22%3E%23define%20configGENERATE_RUN_TIME_STATS%200%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%223%22%3E%23define%20configUSE_TRACE_FACILITY%201%20%2F%2F%20legacy%20trace%2C%20prerequisite%20for%20configUSE_TRACE_FACILITY%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%223%22%3E%23define%20configUSE_STATS_FORMATTING_FUNCTIONS%201%20%2F%2F%20DRN%3A%20may%20be%20required%20for%20FreeRTOS-aware%20debugger%20windows%3F%3F%3C%2FFONT%3E%3C%2FLI%3E%3CLI%3EArm%20GNU%20Toolchain%2013.2.rel1%20(Build%20arm-13.7))%2013.2.1%2020231009%3C%2FLI%3E%3CLI%3EJLink%20debugger%20configuration%20enables%20FreeRTOS%3A%3CBR%20%2F%3E%3CDIV%20class%3D%22%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JLink_debug_cfg.PNG%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22JLink_debug_cfg.PNG%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F378131i687CECEB4DD75AAD%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22JLink_debug_cfg.PNG%22%20alt%3D%22JLink_debug_cfg.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EAny%20help%20would%20be%20greatly%20appreciated!%3C%2FP%3E%3CP%3EThanks%2C%3CBR%20%2F%3EBest%20Regards%2C%20Dave%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2325236%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MXRT%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2325839%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCUxpresso%3A%20FreeRTOS%20task%20and%20queue%20list%20windows%20empty%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2325839%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20got%20this%20working%20by%20upgrading%20to%26nbsp%3BSEGGER%20J-Link%20V9.22%20software.%3CBR%20%2F%3EAs%20always%20it%20takes%20a%20couple%20of%20tries%20to%20get%20something%20into%20the%20FreeRTOS-aware%20windows%20(long-standing%20MCUxpresso%20bug).%3C%2FP%3E%3CP%3EContrary%20to%20some%20documentation%20on%20this%20site%2C%20at%20least%20for%20Segger%20the%26nbsp%3B%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Efreertos_tasks_c_additions.h%3C%2FFONT%3E%20file%20is%20%3CEM%3E%3CU%3E%3CSTRONG%3Enot%3C%2FSTRONG%3E%3C%2FU%3E%3C%2FEM%3E%20required.%3CBR%20%2F%3EThe%20relevant%26nbsp%3BFreeRTOSCOnfig%20settings%20I'm%20now%20using%20are%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-cpp%22%3E%3CCODE%3E%2F*%20Run%20time%20and%20task%20stats%20gathering%20related%20definitions.%20*%2F%0A%23define%20configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H%20%200%20%2F%2F%20DRN%3A%20NOT%20required%20for%20FreeRTOS-aware%20debugger%20windows%3F%3F%0A%23define%20configGENERATE_RUN_TIME_STATS%20%20%20%20%20%20%20%20%20%200%0A%23define%20configUSE_TRACE_FACILITY%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%2F%2F%20DRN%3A%20NOT%20required%20for%20FreeRTOS-aware%20debugger%20windows%2C%20prerequisite%20for%20vTaskList()%2C%20vTaskGetRunTimeStats()%2C%20etc.%0A%23define%20configUSE_STATS_FORMATTING_FUNCTIONS%20%20%200%20%2F%2F%20DRN%3A%20NOT%20required%20for%20FreeRTOS-aware%20debugger%20windows%0A%23define%20configENABLE_BACKWARD_COMPATIBILITY%20%20%20%20%201%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2325321%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCUxpresso%3A%20FreeRTOS%20task%20and%20queue%20list%20windows%20empty%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2325321%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F132425%22%20target%3D%22_blank%22%3E%40davenadler%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EThank%20you%20so%20much%20for%20your%20interest%20in%20our%20products%20and%20for%20using%20our%20community.%3C%2FP%3E%0A%3CDIV%3EFirst%2C%20I%20recommend%20referring%20to%20the%20MCUXpresso%20IDE%20FreeRTOS%20Debug%20Guide%20for%20detailed%20requirements%20and%20configuration%20steps%3A%3C%2FDIV%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fwebapp%2FDownload%3FcolCode%3DUG10059%26amp%3BappType%3Dlicense%26amp%3Blocation%3Dnull%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fwebapp%2FDownload%3FcolCode%3DUG10059%26amp%3BappType%3Dlicense%26amp%3Blocation%3Dnull%3C%2FA%3E%3C%2FP%3E%0A%3CDIV%3ESecond%2C%20regarding%20your%20issue%2C%20please%20try%20the%20following%20actions%20to%20address%20the%20likely%20root%20cause%3A%3C%2FDIV%3E%0A%3CP%3E1%3A%26nbsp%3BSet%20configENABLE_BACKWARD_COMPATIBILITY%20to%200%20in%20FreeRTOSConfig.h%3C%2FP%3E%0A%3CDIV%3E%0A%3CP%3EA%20similar%20case%20was%20reported%20in%20the%20NXP%20Community%2C%20where%20setting%20this%20macro%20to%200%20resolved%20the%20problem%20of%20an%20empty%20FreeRTOS%20Task%20List.%3CBR%20%2F%3EPlease%20apply%20the%20same%20fix%20to%20test%20whether%20it%20resolves%20your%20issue.%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FMCUXpresso-IDE%2FFreertos-debug-issue%2Fm-p%2F1403312%22%20target%3D%22_blank%22%3ESolved%3A%20Freertos%20debug%20issue%20-%20NXP%20Community%3C%2FA%3E%3C%2FP%3E%0A%3CDIV%3E%0A%3CP%3E2%3A%26nbsp%3BFollow%20the%20configuration%20described%20in%20Section%204.2%20(SEGGER%20J%E2%80%91Link%20probes)%20of%20the%20MCUXpresso%20IDE%2025.06%20FreeRTOS%20Debug%20Guide%3C%2FP%3E%0A%3CDIV%3E%0A%3CP%3EFreeRTOS%20thread-aware%20debugging%20for%20SEGGER%20J%E2%80%91Link%20is%20disabled%20by%20default%2C%20and%20you%20must%20explicitly%20enable%20the%20RTOS%20plug%E2%80%91in%20(GDBServer%2FRTOSPlugin_FreeRTOS)%20in%20your%20J%E2%80%91Link%20Launch%20Configuration.%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3CP%3EWish%20it%20helps%20you%3C%2FP%3E%0A%3CP%3EBest%20Regards%3C%2FP%3E%0A%3CP%3EMayLiu%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E