Skip to content

XRTOS Hangs on uC/OS-II if task is not created with extended information #797

@CIPop

Description

@CIPop

The following code will cause the debugger to hang once a breakpoint is used after this task is created:

err = OSTaskCreate(Consume, (void*)0, &Task3Stk[APP_CFG_TASK_START_STK_SIZE-1], APP_TASK_TEST3_PRIO);

Replacing this code with the extended version which populates stack information will work as expected:

  err = OSTaskCreateExt(
    Consume, 
    (void*)0, 
    &Task3Stk[APP_CFG_TASK_START_STK_SIZE-1], 
    APP_TASK_TEST3_PRIO, 
    APP_TASK_TEST3_PRIO, 
    &Task3Stk[0], 
    APP_CFG_TASK_START_STK_SIZE,
    NULL, 
    OS_TASK_OPT_STK_CHK);

Getting the following output with the workaround:
Screenshot 2023-01-07 at 6 58 34 PM

Expected When information isn't provided, the debugger should not attempt to retrieve it.
Actual The debugger hangs for a few seconds, not accepting any further commands.

I tried disabling OpenOCD RTOS in launch.json (// "rtos": "auto",) but it did not have any effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions