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.

RTOS Analyzer greyed out

Hello,

There are many search results about this topic, but none seems to help me. I have configured UIA (I think) and still the menu items below tools->rtos analyzer are grayed out :(

I'd like to analyze the execution sequence on the C6747 DSP of a TI 814x/Davinci processor. Therefore, I followed the instructions of spruh43f.pdf, section 3.3:

  • UIA is installed
  • I configured LoggingSetup in my .cfg file
  • I enabled event logging for swi and hwi
  • I connected with my XDS510 to the C6747

And yet, the menu items are grayed out.

That's in my .cfg :

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

The RTOS Object view  lists the LoggerStopMode in green and I can see information about "All modules ti.uia.runtime", for example. So it seems to work in general.

What I have /not/ configured is the part in spruh43f about Multicore Targets. Do I need this? I'm not interested in anything from the ARM side, I only want to see the execution graph on the C6747... If I need this, please give me some hints on how to configure it...

By the way: I'm using CCS 5.5. The application is build using ezsdk 5.05.02.00 with uia version 1.01.01.14. It's not a CCS project, but a Makefile/configuro project.

Please, what am I missing?

  • Hi Markus,

    You shouldn't need any of the multicore configuration for UIA. Can you post your .cfg file?
    Thanks,

    Janet
  • Yes, here it is:

    /* Used modules */
    var Assert       = xdc.useModule('xdc.runtime.Assert');
    var BIOS         = xdc.useModule('ti.sysbios.BIOS');
    var Cache        = xdc.useModule('ti.sysbios.family.c64p.Cache');
    var Clock        = xdc.useModule('ti.sysbios.knl.Clock');
    var Diags        = xdc.useModule('xdc.runtime.Diags');
    var DmTimer      = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
    var ECM          = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
    var Error        = xdc.useModule('xdc.runtime.Error');
    var GateTask     = xdc.useModule('ti.sysbios.gates.GateTask');
    var HalTimer     = xdc.useModule('ti.sysbios.hal.Timer' );
    var Ipc          = xdc.useModule('ti.sdo.ipc.Ipc');
    var List         = xdc.useModule('ti.sdo.utils.List');
    var Main         = xdc.useModule('xdc.runtime.Main');
    var GateHwi      = xdc.useModule('ti.sysbios.gates.GateHwi');
    var HeapMem      = xdc.useModule('ti.sysbios.heaps.HeapMem');
    var Memory       = xdc.useModule('xdc.runtime.Memory');
    var MultiProc    = xdc.useModule('ti.sdo.utils.MultiProc');
    var Semaphore    = xdc.useModule('ti.sysbios.knl.Semaphore');
    var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
    var SysMin       = xdc.useModule('xdc.runtime.SysMin');
    //var SysStd       = xdc.useModule('xdc.runtime.SysStd');
    var Syslink      = xdc.useModule('ti.syslink.ipc.rtos.Syslink');
    var System       = xdc.useModule('xdc.runtime.System');
    var Task         = xdc.useModule('ti.sysbios.knl.Task');
    var Log          = xdc.useModule('xdc.runtime.Log');
    // var Logger       = xdc.useModule('xdc.runtime.LoggerBuf');
    // var Logger       = xdc.useModule('xdc.runtime.LoggerSys');
    var Defaults     = xdc.useModule('xdc.runtime.Defaults');
    var Timestamp    = xdc.useModule('xdc.runtime.Timestamp');
    var Swi          = xdc.useModule('ti.sysbios.knl.Swi');
    var GateSwi      = xdc.useModule('ti.sysbios.gates.GateSwi');
    
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    LoggingSetup.sysbiosSwiLogging = true;
    LoggingSetup.sysbiosHwiLogging = true;
    
    /* Settings of the System module */
    /*
     *  The SysStd System provider is a good one to use for debugging
     *  but does not have the best performance. Use xdc.runtime.SysMin
     *  for better performance.
     *
     *  Without SysStd, we can't plot the measure-tree for debugging purpose, so we keep
     *  it for now. In release-builds, System_printf is not called anyway, so there's no harm.
     */
    System.SupportProxy = SysMin;        // Implementation of ISystemSupport using ANSI C Standard Library
    System.extendedFormats = "%f%$S";    // For printf
    
    
    /* For LoggerBuf */
    // Logger.enableFlush   = true;      // for LoggerBuf
    // Defaults.common$.logger = Logger.create({exitFlush: true});
    
    /* For LoggerSys */
    // Defaults.common$.logger = Logger.create();
    
    /*
     *  ======== IPC Configuration ========
     */
    
    
    /* configure processor names */
    var procNameAry = MultiProc.getDeviceProcNames();
    MultiProc.setConfig("DSP", procNameAry);
    
    /* ipc setup for SR0 Memory (host processor not running Sys/Bios) */
    Ipc.sr0MemorySetup = false;
    
    /* set ipc sync to pair, requiring Ipc_attach() call on all processors */
    Ipc.procSync = Ipc.ProcSync_PAIR;
    
    /* define host processor */
    Ipc.hostProcId = MultiProc.getIdMeta("HOST");
    
    /* shared region configuration */
    var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
    
    /* configure SharedRegion #0 (IPC) */
    var SR0Mem = Program.cpu.memoryMap["SR_0"];
    
    SharedRegion.setEntryMeta(0,
        new SharedRegion.Entry({
            name:           "SR0",
            base:           SR0Mem.base,
            len:            SR0Mem.len,
            ownerProcId:    MultiProc.getIdMeta("HOST"),
            cacheEnable:    false,
            isValid:        true
        })
    );
    
    /* configure SharedRegion #1 (MessageQ Buffers) */
    var SR1Mem = Program.cpu.memoryMap["SR_1"];
    
    SharedRegion.setEntryMeta(1,
        new SharedRegion.Entry({
            name:           "MessageQ Buffers",
            base:           SR1Mem.base,
            len:            SR1Mem.len,
            ownerProcId:    MultiProc.getIdMeta("HOST"),
            cacheEnable:    false,
            isValid:        true
        })
    );
    
    /* Here's a quick tip for figuring out what memory range a MAR bit
    corresponds to. Since each MAR corresponds to a 16MB range of memory,
    that corresponds to a 24-bit address boundary. In other words, the
    most significant byte of the address corresponds to the MAR. For
    example, address 0x80000000 is often the start of DDR. Take the most
    significant byte, 0x80. Since 0x80 = 128, that means MAR128 controls
    that address range.  */
    
    /* The original eszdk memory-map is located here:
    ezsdk_5_05_02_00/component-sources/omx_05_02_00_48/src/ti/omx/build/MemSegmentDefinition.xs
    Our adjusted variant is in the same directory as this file.
    The adjustments that really matter are defined in config.bld.
    the DSP Memory currently lives at base: 0xA1000000, len:  0x12D00000. This means, we have
    to set MAR 0xA1 to 0xB3  -> 161 to 179 */
    
    Cache.MAR128_159 = 0x07F00000;  // 0000 0111 1111 0000 0000 0000 0000 0000
    //Cache.MAR160_191 = 0x000FFFFE;   // 0000 0000 0000 1111 1111 1111 1111 1110
    Cache.MAR32_63   = 0x00000000;  //  FPGA region (and more)
    
    
    
    /* These seem to be the defaults
    Cache.initSize.l1pSize = Cache.L1Size_32K;
    Cache.initSize.l1dSize = Cache.L1Size_32K;
    Cache.initSize.l2Size = Cache.L2Size_256K;
    Cache.MAR32_63   = 0x00000000;  //  FPGA region (and more): disabled by default
    Cache.MAR128_159 = 0xffffffff;
    Cache.MAR160_191 = 0xffffffff;
    Cache.MAR192_223 = 0xffffffff;
    Cache.MAR224_255 = 0xffffffff;
    */
    
    
    
    /*
     *  ======== Operating System Configuration ========
     */
    HeapMem.common$.gate = GateHwi.create();
    
    var heap0 = HeapMem.create();
    heap0.sectionName = "myHeap";
    Program.sectMap["myHeap"] = Program.platform.dataMemory;
    heap0.size = 0x12000000;
    Memory.defaultHeapInstance = heap0;
    Program.heap           = 0x12000000;;
    Program.stack          = 0x6000;
    
    
    /* system clock runs at 20 MHz */
    DmTimer.intFreq.hi = 0;
    DmTimer.intFreq.lo = 20000000;
    DmTimer.timerSettings[0].intNum = 14;  // I don't understand why we need this. Is it DMA related?
    
    /*
     *  ======== DMA Settings  ========
     */
    
    var EDMA3RM = xdc.loadPackage('ti.sdo.edma3.rm');
    var EDMA3RMSample = xdc.loadPackage('ti.sdo.edma3.rm.sample');
    var EDMA3Driver = xdc.loadPackage('ti.sdo.edma3.drv');
    var EDMA3Sample = xdc.loadPackage('ti.sdo.edma3.drv.sample');
    
    
    
    
    /*
     *  Application constants that all three programs use.
     */
    Program.global.MSGQ_NAME              = "MSGQ_";
    Program.global.HEAP_NAME              = "HeapMemMP";
    Program.global.HEAP_ALIGN             = 128;
    Program.global.HEAP_MSGSIZE           = 0x1F8E80; // strange: one bye more and allocation crashes.
                                                    // 2MB should be possible.
    Program.global.HEAP_NUMMSGS           = 1;
    Program.global.HEAPID                 = 0;
    Program.global.HOSTID                 = MultiProc.getIdMeta("HOST");
    Program.global.DSPERROR_EVENT_NO      = 12;
    Program.global.DSP_VERSION_MAJOR      =  1; // increment if api breaks
    Program.global.DSP_VERSION_MINOR      =  5; // increment for new, api compatible features
    Program.global.DSP_VERSION_PATCH      = 54; // increment for bugfixes, no api change
    Program.global.FFT_MINIMUM_BLOCK_SIZE = 256;
    Program.global.ARM_MINIMUM_BLOCK_SIZE = 256;
    Program.global.MAX_CALC_TIME = 10000;
    
    Program.global.TSCL_TO_SECONDS = 1.0 / DmTimer.intFreq.lo;
    /* Gates */
    
    var params = new GateSwi.Params;
    Program.global.Timestamps_Gate = GateSwi.create();
    Program.global.FIFODMAGate = GateSwi.create();
    
    /* Semaphores */
    // Blocks until edma transfer is finished
    Program.global.g_FPGATransferFinishedSemaphore			= Semaphore.create(0);		// create empty
    Program.global.g_FPGATransferFinishedSemaphore.mode		= Semaphore.Mode_BINARY;	// Mutex
    
    // synchronizes buffer passing between sampling and calculation
    Program.global.g_BufferReadySemaphore			= Semaphore.create(0);		// create empty
    Program.global.g_BufferReadySemaphore.mode		= Semaphore.Mode_COUNTING;	// counting, but more than
    																			// one instance means realtime problems
    
    // Protects access to data structures that are used for calculation
    // This might become a MeastreeSemaphore or the like...
    Program.global.g_CalculatingSemaphore			= Semaphore.create(1);		// create available
    Program.global.g_CalculatingSemaphore.mode		= Semaphore.Mode_BINARY;	// Mutex
    
    // Protects access to the "enabled" flag of a measure tree node
    Program.global.g_MeasTreeNodeEnableSemaphore		  = Semaphore.create(1);  // 1 available
    Program.global.g_MeasTreeNodeEnableSemaphore.mode	  = Semaphore.Mode_BINARY;	// Mutex
    
    // Protects access to the "acquisition time"
    Program.global.g_AcquisitionTimeSemaphore		  = Semaphore.create(1);  // 1 available
    Program.global.g_AcquisitionTimeSemaphore.mode	  = Semaphore.Mode_BINARY;	// Mutex
    
    // Protects access to the "timestamps"
    Program.global.g_TimestampsSemaphore		  = Semaphore.create(0);  // create empty
    Program.global.g_TimestampsSemaphore.mode	  = Semaphore.Mode_BINARY;	// Mutex
    
    /*
     *  ======== Static BIOS classes initialisation  ========
     */
    
    /* List (former Queue) that passes the signal buffers from the sampling- to the calculation thread */
    Program.global.g_BufferList = List.create();
    
    /* SWI (Software interrupts) */
    
    /* This swi is triggered by a timer to periodically move data from the */
    /* FIFO to calculation buffers */
    var swiReadFifoParams = new Swi.Params();
    Program.global.g_swiReadFifo = Swi.create( '&swiReadFifoFxn', swiReadFifoParams);
    /* var swiTriggerParams = new Swi.Params(); */
    /* Program.global.g_swiTrigger = Swi.create( '&swiTriggerFxn', swiTriggerParams); */
    
    /* Task that does the notify sending */
    Program.global.tsk_message = Task.create('&TskMessageFunc');
    Program.global.tsk_message.instance.name = "tsk_message";
    Program.global.tsk_message.arg0 = MultiProc.getIdMeta("HOST");
    Program.global.tsk_message.stackSize = 0x2000;
    Program.global.tsk_message.priority  = 7;
    
    /* Task that calculates on data from sampling thread */
    var TskCalculation = Task.create('&TskCalculationFunc');
    TskCalculation.instance.name = "TskCalculation";
    TskCalculation.stackSize = 0x2000;
    TskCalculation.priority  = 6;
    
    /* Task that sends timestamps d */
    var TskTimestamps = Task.create('&TskTimestampsFunc');
    TskTimestamps.instance.name = "TskTimestamps";
    TskTimestamps.stackSize = 0x2000;
    TskTimestamps.priority  = 5;
    
    
    /* Task for testing
     *var TskTesting = Task.create('&TskTestingFunc');
     *TskTimestamps.instance.name = "TskTesting";
     *TskTimestamps.stackSize = 0x2000;
     *TskTimestamps.priority  = 4;*/
    
    /* install a SYS/BIOS startup function */
    BIOS.addUserStartupFunction('&TskBIOSStartup');
    
    /*
     *  ======== Error handling  ========
     */
    
    Main.common$.diags_ASSERT   = Diags.ALWAYS_ON;
    Main.common$.diags_INTERNAL = Diags.ALWAYS_ON;
    Main.common$.diags_USER1    = Diags.ALWAYS_ON;
    
    /* Install a global error handler. Userfull to be able to set breakpoints! */
    Error.raiseHook = '&errorHook';
    
    /*
     * Needed for EDMA3, although I don't know what it /really/ does :(
     */
    Clock.timerId = 2;    /* to pick Timer 2 */
    
    ECM.eventGroupHwiNum[0] = 7;
    ECM.eventGroupHwiNum[1] = 8;
    ECM.eventGroupHwiNum[2] = 9;
    ECM.eventGroupHwiNum[3] = 10;
    

  • Hi Markus,

    The cfg file looks ok for UIA configuration. There are some generated files needed by System Analyzer, located under the package/cfg, a .uia.xml file and a .rta.xml file. These would have been generated by configuro. Since you're not building in CCS, System Analyzer may not be able to find these files. To check that this is what is happening, you could copy those to generated files to the same directory as your .out file. If that fixes the problem, you can create a UIA config file for your DSP executable. To create a custom UIA config file in CCS 5.5:

    Go to the menu item Tools -> System Analyzer -> Live

    In the "Live Parameters" window that pops up, click on the "Create UIA Config File" button. You should see something like this:

    Click on the green button in the upper right corner to add an endpoint. Then you can browse to the uia.xml file. (I am using evm6472 simulator, so your endpoint will be different.) You should have something like this:

    I will post the images in another post because I am having problems with the editor.
    Best regards,

    Janet
  • Hi Markus,

    Here is what you should see when you click on the "Create UIA Config" button:

    Here is an example of an endpoint configuration:

    Best regards,

        Janet

  • Hello Janet,

    janet said:
    There are some generated files needed by System Analyzer, located under the package/cfg, a .uia.xml file and a .rta.xml file. These would have been generated by configuro.

    I can see the .rta.xml file, but the .uia.xml file is missing :( which could explain the problem. Do I have to adjust something in my makefile? The configuro-related part is this:

    configuro/linker.cmd: $(CONFIGURATION) ./config.bld
    	@$(ECHO) "# Generating $@"
    	@$(XDC_INSTALL_DIR)/xs --xdcpath="$(subst +,;,$(PKGPATH))" \
                xdc.tools.configuro -o configuro \
                -t ti.targets.elf.C674 -c $(CGT_C674_ELF_INSTALL_DIR) \
                -p ti.platforms.evmTI814X:dsp -b ./config.bld \
                -r $(PROFILE) $(CONFIGURATION)
    

    The package-path includes uia_1_01_01_14

    Many thanks for your most appreciated help!

  • Hello Janet,

    Please ignore my other post from today (I hope it's deleted by now). I just made a mistake when building the binary.
    I followed your instructions and at last, the RTOS Analyzer runs fine :)

    I have another question: If I leave the .cfg file as it is, will I have a speed penalty in my release builds? I wouldn't mind in the debug builds...

    Thanks again,
    Markus
  • Hi Markus,
    I'm glad to hear System Analyzer is working now. There will be some overhead if you leave logging in your program, especially with these:

    LoggingSetup.sysbiosSwiLogging = true;
    LoggingSetup.sysbiosHwiLogging = true;

    You could remove those two lines, and you'll still get an execution graph showing the tasks.
    Best regards,
    Janet