tasks don't show up on FreeRTOS task list when debugging

cancel
Showing results for 
Search instead for 
Did you mean: 

tasks don't show up on FreeRTOS task list when debugging

783 Views
Contributor III

Hi, 

please check below screenshot, I created a task by xTaskCreateStatic, and named as "Task".

this task is started, I set a breakpoint in my task, and the PC is stopped. then I refresh the "Task list" of FreeRTOS debug plugin, but my task info doesn't show up. (it showed up some times, but some times no, I don't know why)

QQ图片20180101180510.png

0 Kudos
6 Replies

114 Views
Contributor III

Thanks Ruud. Is this something that can be shared with NXP/MCUXpresso IDE team so that it gets included in an upcoming release? I am finding that even with a PEMicro Multilink ACP probe I have the same behavior.

MCUXpresso IDE team, are there any plans to address this issue that you may have already scheduled?

Thanks.

-Ed.

0 Kudos

114 Views
Contributor III

Hi Ed,

I changed the following timeout value to something high (like 10000).

gate.await(2000L, TimeUnit.MILLISECONDS);

I used Java Bytecode Editor to do that.

This is some of the decompiled source code (maybe handy for the IDE team?);

  private MemoryByte[] readBytes(long address, long length)
  {
    DsfServicesTracker tracker = new DsfServicesTracker(DsfUIPlugin.getBundleContext(), getContext().getSessionId());
    IStack stack = (IStack)tracker.getService(IStack.class);
    
    MIDataReadMemoryBytes mi = new MIDataReadMemoryBytes(getContext(), "0x" + Long.toString(address, 16), 0L, (int)length);
    final CountDownLatch gate = new CountDownLatch(1);
    final List<MemoryByte[]> list = Collections.synchronizedList(new ArrayList());
    
    DataRequestMonitor<MIDataReadMemoryBytesInfo> rm = new DataRequestMonitor(stack.getExecutor(), null)
    {
      public void handleSuccess() {
        list.add(((MIDataReadMemoryBytesInfo)getData()).getMIMemoryBlock());
        gate.countDown();
      }
      
    };
    ICommandControl cc = (ICommandControl)tracker.getService(ICommandControl.class);
    cc.queueCommand(mi, rm);
    try
    {
      gate.await(2000L, TimeUnit.MILLISECONDS);
    }
    catch (InterruptedException localInterruptedException) {}
    if (list.isEmpty()) {
      Logger.error(Texts.get("Error.ReadBytesTimout"));
      return null;
    }
    
    return (MemoryByte[])list.get(0);
  }
0 Kudos

114 Views
Contributor III

Hello Ruud,

Where can I find the MemoryReader config option? Is this a setting from within MCUXpresso IDE that can be increased? I am running into a similar issue and want to see if I can avoid having to purchase another debug probe. I'm currently using the iMXRT1050-EVKB as a debug probe and also LPC-Link2, both Daplink adaptations.

Thanks.

-Ed.

0 Kudos

114 Views
Contributor III

Hi Ed,

It is not a config option unfortunately, I actually changed the binary code of the plugin.

BR,

Ruud

0 Kudos

114 Views
Contributor III

Hi,

I had the same problem while debugging using OpenSDA. Turned out that the OpenSDA connection was too slow to transfer the information from the target. 

If you see logging like this in the TAD log, you probably experiencing the same problem.

17:01:45.557 ERROR: [TaskFactory] Cannot read information from "pxReadyTasksLists[5]".
17:01:49.274 ERROR: [MemoryReader] Read bytes method timed out!
17:01:49.274 ERROR: [MemoryReader] Could not get memory block! Invalid address "0x40005a68" and/or "0x1e20" length of a block!
17:01:49.274 ERROR: [TaskFactory] Stack memory block was not read properly, stack has default values.
17:01:50.276 ERROR: [TaskFactory] Cannot read information from "xDelayedTaskList1".

The MemoryReader in the tad plugin uses a default of 2 seconds, which is not always enough. 

BR,

Ruud

0 Kudos

114 Views
NXP Employee
NXP Employee

Hi, 

I tried your scenario on modified example project (in attachment if you like to test it on your machine) - and I can't reproduce your issue. All static tasks (4) are shown properly for me all time. 

pastedImage_3.png

My FreeRTOS Task Aware Debugger for GDB version is 1.0.2.201704260904

Jiri

0 Kudos