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
770 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
717 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
718 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
742 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