1 Reply Latest reply on May 17, 2018 1:48 PM by NiMc_1688136

    Debugging issue - threads not shown in Debug Window

    NiMc_1688136

      For my application I need to port app code that uses FreeRTOS function calls so I want to by bypass the WICED abstraction layer and use FreeRTOS directly.

       

       

      When I build the project in debug mode and run it,  the GDB session does not show the task in the Debug window. If I pause execution, the GDB session disconnects (and I have to close openocd-all-brcm-libftdi.exe in task manager).

       

      I can run a basic  app with the WICED abstraction layer + freeRTOS and it run in the debugger fine with all the tasks listed in the Debug window (top left of IDE).

       

      Any ideas? Is there something that provides information for GDB to populate the Debug screen that I am missing?

        • 1. Re: Debugging issue - threads not shown in Debug Window
          NiMc_1688136

          I think I fixed it

           

          I checked the openOCD log and found it said I was missing uxTopUsedPriority which is allows the debugger to find task information.

           

          I forgot to mention that I also pupgraded to FreeRTOS v10.0.1 so uxTopUsedPriority was not defined. Within Tasks.c in the WICED SDK FreeRTOS v9, this is defined near line 358.

           

          /*********/

          /* This variable allows OpenOCD to read the thread lists properly */

          PRIVILEGED_DATA static unsigned portBASE_TYPE uxTopUsedPriority __attribute__((used)) = configMAX_PRIORITIES;

          /*********/

           

          Also in tasks.c, near line 859, uxTopUsedPriority is also used...

          /* This is used as an array index so must ensure it's not too large.  First

          remove the privilege bit if one is present. */

          /* WICED: Changed to uxTopUsedPriority from configMAX_PRIORITIES to ensure the uxTopUsedPriority is always linked - enabling OpenOCD to work properly */

          if( uxPriority >= ( UBaseType_t ) uxTopUsedPriority )

          {

          uxPriority = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) 1U;

          }

          else

          {

          mtCOVERAGE_TEST_MARKER();

          }

           

           

          Once I added this code, the debugger shows the tasks and it does not crash!

          1 of 1 people found this helpful