TI E2E Community
MCSA - How to effect task logging at run time
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:
Nothing I do at runtime has any impact on task logging. Its either on via static config - or off.
Task.common$.diags_USER1 = Diags.ALWAYS_OFF;Task.common$.diags_USER2 = Diags.ALWAYS_OFF;
Turns it off
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?
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 for your reply.
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)
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
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?
What device are you using? Can you post your .cfg file?
I can't replicate the problem you're seeing just yet.
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)
To stop logging: (I had this in a low priority task. BP just after)
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.
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.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.