This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Calling Task_sleep results in thread to abort() at exit

 

I have 2 tasks setup in my application with the same priority level 1.  Timer, SWI, and Task support are enabled.  I attached the configuration file as part of the post.

I am trying to use the Task_sleep() call in my project and my application seems to be aborting on the call (ie. task thread is in abort() function).  The message in the debugger reads:

0 abort() at exit.c:61 0x3eb75a

I have the default clock module setup properly and is incrementing in ticks if I don't have any Task_sleep() calls.

Do you have any suggestions / solution to this issue?

Thank you.


PROJECT SETUP
----------------------
SYS/BIOS 6.30.3.46
CCS 4.2.3.00004
XDCToolsv 3.20.8.88
Microprocessor DSP28035

task.cfg
  • Can you describe in more detail exactly where Task_sleep() is being called from and when?

    Have you tried using the ROV tool to examine the state of your Task instances at various points, especially just prior to the call to Task_sleep()?

     

  • Hi David,

    I attached a screen capture of where I am calling it.  After the Task_sleep() is called, the other task "TaskDebugMessage" does not get to run because the program has stopped in abort().

    What are the things I should be looking for to debug this issue in ROV?

    Thanks.

    Stevenson

  • Stevenson,

    The following lines in your .cfg file indicate that you are using the 'SysMin' system support proxy.

     

    SysMin.bufSize = 0;

    SysMin.flushAtExit = false;

    System.SupportProxy = SysMin;

    This means that all output from your application is channeled into a buffer in memory.  Moreover, your application is configured to not flush this buffer when it exists.  It was probably configured this way to lower footprint on C28x devices.

    We might be able to get more information about your problem by examining this buffer for any output placed there prior to the abort().  Refer to the ROV view for 'SysMin' (which is right above 'Task' in the screenshot you attached) and please post the contents of the SysMin buffer.

    Regards,

    Shreyas

     

  • Hi Shreyas,

    I posted the screen capture while inspecting the SysMin buffer.

    It also did not make a difference when I removed the entire module for SysMin (still aborts).

    Thank you.

    Stevenson

  • Hi Stevenson,

    Apologies for the late response--it took me a while to hunt down a similar device and reproduce your problem.  I've found the source of your problem.  The following line in your .cfg file eliminates code that is required to create and construct RTSC instances at run-time.

    // Static memory policy means all RTOS modules are created at design time

    Defaults.common$.memoryPolicy = Types.STATIC_POLICY;

    Task_sleep internally depends on creating instances of the 'Clock' module.  You'd typically see an error raised when you Task_sleep with this configuration in place.  However, your .cfg file also disables the mechanisms that print errors to the console in order to reduce memory footprint.  I think you acquired this code from the c28xMinimal.cfg.xs file?

    In summary, simply remove the above line to be able to Task_sleep in your application. 

    Regards,

    Shreyas

  • Hi Shreyas,

    Thank you for your response.  Removing this line worked!  The clock module now works properly and as expected.

    I got that STATIC_POLICY when I followed the optimization for code size in the manual.

    Thanks again for your help.

    Stevenson