• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » BIOS » BIOS forum » MCSA - How to effect task logging at run time
Share
BIOS
  • Forum
  • Announcements
Options
  • Subscribe via RSS

MCSA - How to effect task logging at run time

MCSA - How to effect task logging at run time

This question is answered
Ian Cole
Posted by Ian Cole
on Jul 27 2012 09:58 AM
Prodigy130 points

Hi,

With many tasks - my event log is swamped and at least half the events are lost if task logging is just 'on':

LoggingSetup.sysbiosTaskLogging = true;

To  overcome this - I have attempted to just switch task logging on in at runtime:

a)

Diags_setMask("ti.sysbios.knl.Task+1");
Diags_setMask("ti.sysbios.knl.Task+2");

...

Diags_setMask("ti.sysbios.knl.Task-1");
Diags_setMask("ti.sysbios.knl.Task-2");

b)
Diags_setMask("ti.sysbios.knl.Task=0");

Nothing I do at runtime has any impact on task logging. Its either on via static config - or off.

This

Task.common$.diags_USER1 = Diags.ALWAYS_OFF;
Task.common$.diags_USER2 = Diags.ALWAYS_OFF;

Turns it off

But this

Task.common$.diags_USER1 = Diags.RUNTIME_OFF;
Task.common$.diags_USER2 = Diags.RUNTIME_OFF;

Turns it on - and no run time attempt turns it off.

I have turned semaphore logging off which helps (a little bit)

How can I control task logging (execution graph) programatically between code points?

Thanks

Ian

bios mcsa task logging
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Tom Kopriva
    Posted by Tom Kopriva
    on Jul 27 2012 16:21 PM
    Expert6950 points

    Hi Ian,

    which version of SYS/BIOS and XDCtools are you using? Are you using UIA?

    If so, you can add:

    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    LoggingSetup.sysbiosTaskLoggingRuntimeControl = true;

    to your .cfg file. That should enable the run-time controls for Task (Swi's and Hwi's can also be controlled).

    Thanks,

    Tom

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Ian Cole
    Posted by Ian Cole
    on Jul 30 2012 02:22 AM
    Prodigy130 points

    Hi Tom,

    Thanks for your reply.

    I'm using:

    bios_6_33_04_39

    xdctools_3_23_03_53

    uia_1_01_00_04

    Setting:

    LoggingSetup.sysbiosTaskLoggingRuntimeControl = true;

    has no effect (probably it's default value).

    I note that stepping over these lines (with static config set to RUNTIME_ON)

    Diags_setMask("ti.sysbios.knl.Task-1");
    Diags_setMask("ti.sysbios.knl.Task-2");
    has ti_sysbios_knl_Task_Module__root__V.mask go from 0x300 -> 0x200 -> 0x0
    But still the task logging events continue.
    
    
    The odd thing is this. With static config set to this
    Task.common$.diags_USER1 = Diags.RUNTIME_OFF;
    Task.common$.diags_USER2 = Diags.RUNTIME_OFF;
    The task events are off at main and no events are seen for our first task create. And when the runtime calls are made to Diags_setMask - the global mask is already set to 0. But later on they seem to get enabled and the events flood in. Even though the mask remains at 0.
    I'm baffled at why task events seem to get enabled later and ignore any runtime Diags_setMask calls?
    
    
    Thanks
    Ian



    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Tom Kopriva
    Posted by Tom Kopriva
    on Jul 30 2012 21:01 PM
    Expert6950 points

    Hi Ian

    What device are you using? Can you post your .cfg file?

    I can't replicate the problem you're seeing just yet.

    Thanks,

    Tom

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Ian Cole
    Posted by Ian Cole
    on Jul 31 2012 03:52 AM
    Verified Answer
    Verified by David Friedland
    Prodigy130 points

    Hi Tom,

    The device is C6670 - but...

    I went back to the stair step example (which I had running on our target) and got runtime task logging control going here. That highlighted my mistake in our app and all is now working.

    The salient points for future reference:

    In the .cfg

    LoggingSetup.sysbiosTaskLogging = true;
    LoggingSetup.sysbiosTaskLoggingRuntimeControl = true;
    Task.common$.diags_USER1 = Diags.RUNTIME_OFF;
    Task.common$.diags_USER2 = Diags.RUNTIME_OFF;

    Code: To start logging: (I had this in a timer task)

    Diags_setMask("ti.sysbios.knl.Task+1");
    Diags_setMask("ti.sysbios.knl.Task+2");

    To stop logging: (I had this in a low priority task. BP just after)

    Diags_setMask("ti.sysbios.knl.Task-1");
    Diags_setMask("ti.sysbios.knl.Task-2");

    I also added these log statements to add an event to the execution graph:

    Log_write1(UIABenchmark_start, (xdc_IArg)"late");
    Log_write1(UIABenchmark_stop, (xdc_IArg)"late");

    Thanks for you help and Best regards.

    Ian

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use