I am trying to get a basic example using the STS module working in Code Composer Studio version 5.5 on a LogicPD OMAP-L138 EVM board.
As a starting point I used the DSP/BIOS "hello example" which uses the LOG module. This example works - it prints out the message.
I then added the header files for STS and CLK module. In a next step I added calls to both STS_set and STS_delta functions.
What I want to benchmark/profile in this basic example is the call of LOG_printf and stdio printf functions (so I added stdio header file also).
The complete hello.c file looks like:
/*
* Copyright 2010 by Texas Instruments Incorporated.
* All rights reserved. Property of Texas Instruments Incorporated.
* Restricted rights to use, duplicate or disclose this code are
* granted through contract.
*
*/
/***************************************************************************/
/* */
/* H E L L O . C */
/* */
/* Basic LOG event operation from main. */
/* */
/***************************************************************************/
#include <std.h>
#include <stdio.h> // required by printf
#include <log.h>
#include <clk.h>
#include <sts.h>
#include "hellocfg.h"
/*
* ======== main ========
*/
Void main()
{
LOG_printf(&trace, "comparison of printf functions!");
// Method 1: using normal printf
STS_set( &stsPrintf, CLK_gethtime() );
printf( "Calling printf(..)\n");
STS_delta( &stsPrintf, CLK_gethtime() );
// Method 2: using LOG_printf
STS_set( &stsLogprintf, CLK_gethtime() );
LOG_printf(&trace, "Calling LOG_printf\n");
STS_delta( &stsLogprintf, CLK_gethtime() );
LOG_printf(&trace, "done");
/* fall into DSP/BIOS idle loop */
return;
}
I also double-clicked the hello.tcf DSP/BIOS configuration file and "inserted STS" twice under Instrumentation -> STS:
Both with unit type high res. and host operation "A * x". The names equal the names in the .c file.
This adds the following lines to the .tcf files:
bios.STS.create("stsPrintf");
bios.STS.create("stsLogprintf");
bios.STS.instance("stsPrintf").unitType = "High resolution time based";
bios.STS.instance("stsLogprintf").unitType = "High resolution time based";
And the hellocfg.h file also is expanded by:
extern far STS_Obj stsPrintf;
extern far STS_Obj stsLogprintf;
The project still compiles and can be loaded and run on the target DSP (C6748). How can I access the data?
I read in the CCS Tutorial (not explicitly for CCSv5, rather older versions) to open "RTA Control Panel" and "Statistics Data" view.
Both views can be found under Tools -> RTOS Analyzer -> RTA (Legacy). Not to sure if I am right here as legacy might refer to older CCS versions?
"RTA Control Panel" looks like this:
The "Statistics Data" is always empty. Which steps am I missing and/or am I using the wrong view to query the data?
I had a look in the "RTOS Object View (ROV)" before where I could also see the LOG messages, but probably STS is not a "viewable" module.
Edit 1: Maybe relevant: "Enable Real Time Analysis" is set to "True" in the Global System Settings (in the Config Tool).
Edit 2: I cannot find the RTA Control settings Panel which is referenced in some documents, i.e. processors.wiki.ti.com/.../RTA_Control_Panel.JPG
Edit 3: Do I need to create a task and call STS_... from there? If yes, is there a way to avoid it? [Refering to https://e2e.ti.com/support/embedded/tirtos/f/355/p/48450/187912#187912 ]
Any hints will be very much appreciated. Thanks!
PS: I haven't investigated yet but read here https://e2e.ti.com/support/embedded/tirtos/f/355/t/90623 that there may be no STS module in SYS/BIOS anymore. Is that right or has that changed since then?
Kind regards,
Matthias