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.

UIA Min Logger Setup

Other Parts Discussed in Thread: CC2650, SYSBIOS

Hello,

I'm trying to use the UIA logger in the minimum footprint format to view the RTOS execution graph on the CC2650 sensortag, is this supported?

So far I have added the code below to my .cfg file

var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
LoggingSetup.loggerType = LoggingSetup.LoggerType_MIN;

However, when I hault the processor, I don't see any task information in the graph. I have been following spruh43f and spruhd4i.

  • Sean,

    Have you looked at the “UART Echo” example for the sensor tag?  This example includes UIA and logging.

    Thanks,
    Scott

  • Yes I am using that example. However, when I halt the processor using the pause button, click tools > RTOS Analyzer > Execution Graph, I see nothing on the graph
  • Hi Sean,


    Can you post your .cfg file?  There might be something that's preventing logging, for example, like BIOS.logsEnabled = false;

    Thanks,

    Janet

  • /*
     * Copyright (c) 2015, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
    
    /*
     *  ======== uartecho_cc26xx.cfg ========
     */
    
    /* ================ General configuration ================ */
    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    var Diags = xdc.useModule('xdc.runtime.Diags');
    var Error = xdc.useModule('xdc.runtime.Error');
    var Log = xdc.useModule('xdc.runtime.Log');
    var Main = xdc.useModule('xdc.runtime.Main');
    var Memory = xdc.useModule('xdc.runtime.Memory');
    var System = xdc.useModule('xdc.runtime.System');
    var Text = xdc.useModule('xdc.runtime.Text');
    
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    
    /*
     *  Program.stack is ignored with IAR. Use the project options in
     *  IAR Embedded Workbench to alter the system stack size.
     */
    if (!Program.build.target.$name.match(/iar/)) {
        /*
         *  Reducing the system stack size (used by ISRs and Swis) to reduce
         *  RAM usage.
         */
        Program.stack = 0x300;
    }
    
    /*
     * Comment this line to allow module names to be loaded on the target.
     * The module name strings are placed in the .const section. Setting this
     * parameter to false will save space in the .const section.  Error and
     * Assert messages will contain an "unknown module" prefix instead
     * of the actual module name.
     */
    Defaults.common$.namedModule = false;
    
    /*
     * Minimize exit handler array in System.  The System module includes
     * an array of functions that are registered with System_atexit() to be
     * called by System_exit().
     */
    System.maxAtexitHandlers = 2;
    
    /* ================ System configuration ================ */
    var SysMin = xdc.useModule('xdc.runtime.SysMin');
    System.SupportProxy = SysMin;
    SysMin.bufSize = 128;
    
    /* Enable Semihosting for GNU targets to print to CCS console */
    if (Program.build.target.$name.match(/gnu/)) {
        var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
    }
    
    /* ================ BIOS configuration ================ */
    /*
     * Disable unused BIOS features to minimize footprint.
     * This example uses Tasks but not Swis or Clocks.
     */
    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    BIOS.libType = BIOS.LibType_Custom;
    BIOS.logsEnabled = true;
    BIOS.assertsEnabled = true;
    
    /* No memory allocation occurs, so no heap is needed */
    BIOS.heapSize = 0;
    
    /* No runtime stack checking is performed */
    Task.checkStackFlag = false;
    Hwi.checkStackFlag = false;
    
    /* Reduce the number of task priorities */
    Task.numPriorities = 4;
    
    /* ================ Task configuration ================ */
    var task0Params = new Task.Params();
    task0Params.instance.name = "echo";
    task0Params.stackSize = 0x300;
    Program.global.echo = Task.create("&echoFxn", task0Params);
    
    /* ================ Logging configuration ================ */
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    LoggingSetup.loadLoggerSize = 256;
    LoggingSetup.mainLoggerSize = 512;
    LoggingSetup.sysbiosLoggerSize = 1024;
    
    /* ================ Driver configuration ================ */
    var TIRTOS = xdc.useModule('ti.tirtos.TIRTOS');
    TIRTOS.useUART = true;
    TIRTOS.libType = TIRTOS.LibType_Instrumented;
    
    if (Program.cpu.deviceName.match(/CC26/)) {
        /* Change BIOS options for ROM */
        BIOS.logsEnabled = false;
        BIOS.assertsEnabled = false;
        var Power = xdc.useModule('ti.sysbios.family.arm.cc26xx.Power');
        var Boot = xdc.useModule('ti.sysbios.family.arm.cc26xx.Boot');
        Boot.customerConfig = true;
        var ROM = xdc.useModule('ti.sysbios.rom.ROM');
        ROM.romName = ROM.CC2650;
    }
    else if (Program.cpu.deviceName.match(/CC13/)) {
        /* Change BIOS options for ROM */
        BIOS.logsEnabled = false;
        BIOS.assertsEnabled = false;
        var Power = xdc.useModule('ti.sysbios.family.arm.cc26xx.Power');
        var Boot = xdc.useModule('ti.sysbios.family.arm.cc26xx.Boot');
        Boot.customerConfig = true;
        var ROM = xdc.useModule('ti.sysbios.rom.ROM');
        ROM.romName = ROM.CC1350;
    }
    
    

    This is the base .cfg that comes with the example I believe. I am using a fresh version from the resource explorer in CCS. Running on SensorTag v1.2 debugging with debug devpack v1.0.

  • I see now that the logs are disabled as you suggested. However, when I enable them I get a warning about logs not being allowed in ROM. How would I remedy this for the CC26xx on SensorTag?
  • Hi Sean,

    The following lines in your .cfg file cause everything to link into Flash:

    var ROM = xdc.useModule('ti.sysbios.rom.ROM');

    ROM.romName = ROM.CC2650;

    Can you comment these lines out and see if you can get the Logs to work?

    Best regards,

        Janet

  • Janet,

    This remedied the issue, thank you!