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.

Basic DSP/BIOS STS example with CCSv5.5 on EVM OMAP-L138

Other Parts Discussed in Thread: OMAP-L138

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

  • Can you let us know what version of BIOS you are using?
  • +
    STS is a BIOS 5 module, there is a legacy API support module in SYS/BIOS 6 for it but there is no SYS/BIOS 6 equivalent module that offers the same functionality. This might be what you are experiencing if you are using SYS/BIOS 6, and it is not clear to me what these legacy APIs are actually doing, but looks like it is not producing any actual statistics that is viewable via legacy RTA Control UI in CCS.

    In SYS/BIOS 6, you should use UIA for Real-time analysis:
    software-dl.ti.com/.../index.html

    Murat
  • Dear Murat,

    thanks for your reply. There are two folders under C:\ti\ that have a "bios" in their name:
    \bios_5_42_01_09 -> "DSP/BIOS 5.42.01.09 is a GA release based on DSP/BIOS 5.42.00.07. " (from the release notes)
    \bios_6_35_04_50 -> "SYS/BIOS 6.35.04.50 is a GA release of SYS/BIOS 6.35.00."

    IIRC both were installed with the latest release build v5.5.0.00077 (September 2013).

    Edit: the properties dialog of my basic example reads "5.42.1.09" in the DSP/BIOS tool version dropdown list (and is the only selectable value).
     
    Matthias

  • Dear Murat,

    thanks for coming back to me and for pointing me to UIA.

    Let me elaborate a little bit on my situation. What I later want to do is to generate code from Matlab/Simulink for the target which currently is the OMAP-L138. Mathworks Embedded Coder / Board Support Package for DSP C6000 uses parts of DSP/BIOS, it should use STS for code profiling IIRC.

    I just checked the requirement again:
    "DSP/BIOS (Real Time Operating System) -- Required version: 5.33.05 to 5.41.11.38"

    Do you know if newer versions (like mine, see above) will work? If not, can I add an older version of DSP/BIOS manually and how?
    Is the support of the newer SYS/BIOS planned in the future or already supported?
    I wanted to check if using the STS manually works before I switch over to code generation.

    Kind regards,
    Matthias
  • Hi Matthias,

    STS should work for DSP/BIOS 5.x however you should not use it for SYS/BIOS 6. The behavior of the legacy STS support is not clear to me, but looks like just stubs doing nothing to preserve your build from breaking.

    Murat
  • Hi Murat,

    thank you for coming back to me and thansk for the hint according the newer SYS/BIOS 6.
    Could you please still help me to find out why the"Statistics Data" is always empty or what I have missed?

    Thank you,
    Matthias

  • Hi Matthias,

    I don't think you are missing anything. It is just that STS is *not* supported on SYS/BIOS 6, and the STS API functions for all practical purposes don't do anything useful until (and if) STS gets supported. They might be left as stubs to support migrating legacy content -- my guess.

    Murat
  • Dear Murat,

    thanks for coming back to me. I just wanted to say that my initial problem is related to the execution of DSP/BIOS code on the C6748 DSP of an OMAP-L138 EVM board. I have tried to accomplish the same (get STS info) for an C6748 LCDK now with the same issue - I simply do not get any data displayed (only LOG, no STS). The RTOS version the linker uses is still an "old" one (DSP/BIOS: bios_5_42_01_09, not SYS/BIOS 6.x). Thee CCS is a Version: 5.5.0.00077.

    Thanks,
    Matthias