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.

CCS/CC2650STK: Can't start the System Analyzer despite the README.md saying so

Part Number: CC2650STK
Other Parts Discussed in Thread: CC2650, SYSBIOS, CC2640R2F, CC1350

Tool/software: Code Composer Studio

I use CCC 9.1, the Sensor Tag CC2650STK and the XDS110 Debugger.

I build and debug the example uartecho_CC2650STK_TI from tirex and halt the execution in the Debugger.

I open Tools -> System Analyzer -> Duration Analysis and get an error:

The README says:

  • This example also demonstrates System Analyzer in CCS. This is accomplished via stop-mode reading of the logs on the target. Halt the target and open System Analyzer as described in the TI-RTOS User Guide's Viewing the Logs.

Do I still need to configure something ?

Thanks

Peter

  • Peter,

    The System Analyzer User's Guide contains useful information about this suite of advanced debugging tools, but it requires additional steps to be enabled by your source project. Which README document are you reading this? I couldn't find it in the Resource Explorer tree and the uartecho project does not seem to have UIA enabled (as mentioned in the error above). 

    The ROV Classic is the most fundamental debugging tool and already comes with various advanced debugging tools that are described in deeper detail in the Kernel Documentation links of the TI-RTOS for CC2650 product in Resource Explorer

    Hope this helps,

    Rafael

  • Hi Rafael

    Here is a shot of the project:

    Here is the relevant part of the README.md

    • This example also demonstrates System Analyzer in CCS. This is accomplished via stop-mode reading of the logs on the target. Halt the target and open System Analyzer as described in the TI-RTOS User Guide's Viewing the Logs.

    I am aware of the guide but since the README.md seems to say that it comes out of the box I was curious to see what the results would be ...

    Thanks

    Peter

  • Peter, 

    Thanks; I completely overlooked the README.md file on the project itself. 

    Looking at it, it seems rather outdated - the list of development kits is quite old and does not even mention the SensorTag. I will communicate with someone from the SDK team to update this documentation or perhaps provide additional details. 

    I apologize for the inconvenience,

    Rafael

  • Hi Peter,

    For most of the TI-RTOS products, we did have UART Echo be enabled to do logging. Since the CC2650 device is a lean on RAM, we opted to not have UART Echo enable logging. You need to do the following to enable it

    1. Enable kernel logging

    BIOS.logsEnabled = true;
    //BIOS.logsEnabled = false;
    

    2. Don't use the ROM in the kernel

    //var ROM = xdc.useModule('ti.sysbios.rom.ROM');
    //if (Program.cpu.deviceName.match(/CC26/)) {
    //    ROM.romName = ROM.CC2650;
    //}
    //else if (Program.cpu.deviceName.match(/CC13/)) {
    //    ROM.romName = ROM.CC1350;
    //}
    

    3. Bringing LoggingSetup (and potentially decrease the size of the internal buffers).

    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    LoggingSetup.loadLoggerSize = 256;
    LoggingSetup.mainLoggerSize = 512;
    LoggingSetup.sysbiosLoggerSize = 1024;

    Todd

  • Hi Todd

    Thanks, that helped. Still the configuration screen say that Instrumentation for Duration Analysis is inadequate.

    From System Analyser Guide I learned that I need to check :

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

    The  inadequate flag remains for Context Aware Profile. Do I need to activate additional logging functions ?

    Also the readme says that I should see:

    The Live Session should have records like the following

       - "LS_cpuLoad: 0%"
       - "Wrote character 0xa"

    Where would I see this ? In the Printf Logs ?

    Thanks

    Peter

  • Hi Peter,

    The README for that example is incorrect about demonstrating System Analyzer in CCS.  There is nothing in the .cfg file for that example to enable instrumentation for System Analyzer.  The README has been corrected in newer versions of coresdk.

    To enable instrumentation, you need to do the following in your .cfg file:

    1. Enable BIOS logging:  BIOS.logsEnabled = true;
    2. Disable the ROM build by commenting out these lines:


    //var ROM = xdc.useModule('ti.sysbios.rom.ROM');
    if (Program.cpu.deviceName.match(/CC2640R2F/)) {
    //    ROM.romName = ROM.CC2640R2F;
    }
    else if (Program.cpu.deviceName.match(/CC26.2/)) {
    //    ROM.romName = ROM.CC26X2V2;
    }
    else if (Program.cpu.deviceName.match(/CC13.2/)) {
    //    ROM.romName = ROM.CC13X2V2;
    }
    else if (Program.cpu.deviceName.match(/CC26/)) {
    //    ROM.romName = ROM.CC2650;
    }
    else if (Program.cpu.deviceName.match(/CC13/)) {
    //    ROM.romName = ROM.CC1350;
    }

    3. Add LoggingSetup:

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

    That should be enough to get you CPU load and Execution graph.  You should see the CPU load and Task state messages in the Live Session window.

    If you want to do context aware profiling, it is a bit tricky.  You will need to add the following to the .cfg file:

    LoggingSetup.enableContextAwareFunctionProfiler = true;
    var UIABenchmark = xdc.useModule('ti.uia.events.UIABenchmark');

    Then you need to add function entry and exit hook function to your .c file:

    /* Added for function profiling */
    #include <ti/uia/runtime/LogUC.h>
    #include <ti/uia/events/UIABenchmark.h>


    void functionEntryHook( void (*addr)() ) {
        Log_writeUC3(UIABenchmark_startInstanceWithAdrs,
                (IArg)"context=0x%x, fnAdrs=0x%x:",(IArg)0, (IArg)addr);
    }

    void functionExitHook( void (*addr)() ) {
        Log_writeUC3(UIABenchmark_stopInstanceWithAdrs,
                (IArg)"context=0x%x, fnAdrs=0x%x:",(IArg)0, (IArg)addr);
    }

    Log_writeUC3() is a lighter weight Log function that comes with UIA.

    Now build your project.

    After the build, in your project properties, enable the entry and exit functions under Build->ARM Compiler->Advanced Options->Entry/Exit Hook Options:

    Then build (not rebuild) the project.  I did this, and I still got a "partial" for Context Aware Profile in System Analyzer, but I ignored it and things worked ok.  The tricky part about function profiling, is that the BIOS custom library is built with the same compile flags as your project, and you do not want to build BIOS with the entry/exit hooks above.  The reason is that UIA's Log_write() calls BIOS Timestamp_get64().  If Timestamp_get64() is built with the entry hook function, it will in turn call Log_write(), which calls TImestamp_get64, and so on.  The program will crash when the stack overruns.  To avoid this, every time you modify your .cfg file, you need to disable the entry/exit hook in the build options and rebuild.  Then re-enable the hooks and build (not re-build).

    If you just want to add benchmark logging, you can just add UIABenchmark to your .cfg file, and put benchmarking code in your .c file like the following around the block of code you want to benchmark:

        /* loop until we reach termination timestamp */
        Log_write1(UIABenchmark_start, (IArg)"doLoad");
        do {
            now = Timestamp_get32();
        } while ((end - now) < count);
        Log_write1(UIABenchmark_stop, (IArg)"doLoad");

    You will see these outputs in the Duration window.  I got a message saying my configuration for Duration was inadequate, but it seemed to work anyway.

    Best regards,

    Janet

  • janet said:
    To avoid this, every time you modify your .cfg file, you need to disable the entry/exit hook in the build options and rebuild.  Then re-enable the hooks and build (not re-build).

    Is a more maintainable option to use the NO_HOOKS pragma on the Timestamp_get64() function to prevent the compiler from generating hooks for just the problematic function?

    This technique helped for a similar issue on a non-RTOS project - see Compiler/TMS570LS3137: --entry_hook compiler option causes failure in sys_startup

  • Hi Chester,

    Adding the NO_HOOKS seems like a good idea.  There are a few other places it would need to go, such as in LoggerStopMode_write4() which is in the generated .c file because it depends on .cfg settings.

    I tried adding the NO_HOOKS in these places, but am still getting a crash before main().  I'm guessing there are some BIOS initialization functions that need to be added to the "No Hook" list.

    Thanks,

    Janet

  • Janet

    Yes, I get the Live Session info and also Duration info, however Context Aware Profile will show me a Warning : Out of Sequence Data at the bottom of the window.

    Here is my .cfg file:




    /* ================ Boot configuration ================ */
    var Boot = xdc.useModule('ti.sysbios.family.arm.cc26xx.Boot');
    /*
     * This module contains family specific Boot APIs and configuration settings.
     * See the SYS/BIOS API guide for more information.
     */



    /* ================ Clock configuration ================ */
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    /*
     * When using Power and calibrateRCOSC is set to true, this should be set to 10.
     * The timer used by the Clock module supports TickMode_DYNAMIC. This enables us
     * to set the tick period to 10 us without generating the overhead of additional
     * interrupts.
     *
     * Note: The calibrateRCOSC parameter is set within the Power configuration
     *     structure in the "Board.c" file.
     */
    Clock.tickPeriod = 10;



    /* ================ Defaults (module) configuration ================ */
    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    /*
     * A flag to allow module names to be loaded on the target. Module name
     * strings are placed in the .const section for debugging purposes.
     *
     * Pick one:
     *  - true (default)
     *      Setting this parameter to true will include name strings in the .const
     *      section so that Errors and Asserts are easier to debug.
     *  - false
     *      Setting this parameter to false will reduce footprint in the .const
     *      section. As a result, Error and Assert messages will contain an
     *      "unknown module" prefix instead of the actual module name.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //Defaults.common$.namedModule = true;
    Defaults.common$.namedModule = false;



    /* ================ Error configuration ================ */
    var Error = xdc.useModule('xdc.runtime.Error');
    /*
     * This function is called to handle all raised errors, but unlike
     * Error.raiseHook, this function is responsible for completely handling the
     * error with an appropriately initialized Error_Block.
     *
     * Pick one:
     *  - Error.policyDefault (default)
     *      Calls Error.raiseHook with an initialized Error_Block structure and logs
     *      the error using the module's logger.
     *  - Error.policySpin
     *      Simple alternative that traps on a while(1) loop for minimized target
     *      footprint.
     *      Using Error.policySpin, the Error.raiseHook will NOT called.
     */
    //Error.policyFxn = Error.policyDefault;
    Error.policyFxn = Error.policySpin;

    /*
     * If Error.policyFxn is set to Error.policyDefault, this function is called
     * whenever an error is raised by the Error module.
     *
     * Pick one:
     *  - Error.print (default)
     *      Errors are formatted and output via System_printf() for easier
     *      debugging.
     *  - null
     *      Errors are not formatted or logged. This option reduces code footprint.
     *  - non-null function
     *      Errors invoke custom user function. See the Error module documentation
     *      for more details.
     */
    //Error.raiseHook = Error.print;
    Error.raiseHook = null;
    //Error.raiseHook = "&myErrorFxn";

    /*
     * If Error.policyFxn is set to Error.policyDefault, this option applies to the
     * maximum number of times the Error.raiseHook function can be recursively
     * invoked. This option limits the possibility of an infinite recursion that
     * could lead to a stack overflow.
     * The default value is 16.
     */
    Error.maxDepth = 2;



    /* ================ Hwi configuration ================ */
    var halHwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
    /*
     * Checks for Hwi (system) stack overruns while in the Idle loop.
     *
     * Pick one:
     *  - true (default)
     *      Checks the top word for system stack overflows during the idle loop and
     *      raises an Error if one is detected.
     *  - false
     *      Disabling the runtime check improves runtime performance and yields a
     *      reduced flash footprint.
     */
    //halHwi.checkStackFlag = true;
    halHwi.checkStackFlag = false;

    /*
     * The following options alter the system's behavior when a hardware exception
     * is detected.
     *
     * Pick one:
     *  - Hwi.enableException = true
     *      This option causes the default m3Hwi.excHandlerFunc function to fully
     *      decode an exception and dump the registers to the system console.
     *      This option raises errors in the Error module and displays the
     *      exception in ROV.
     *  - Hwi.enableException = false
     *      This option reduces code footprint by not decoding or printing the
     *      exception to the system console.
     *      It however still raises errors in the Error module and displays the
     *      exception in ROV.
     *  - Hwi.excHandlerFunc = null
     *      This is the most aggressive option for code footprint savings; but it
     *      can difficult to debug exceptions. It reduces flash footprint by
     *      plugging in a default while(1) trap when exception occur. This option
     *      does not raise an error with the Error module.
     */
    //m3Hwi.enableException = true;
    //m3Hwi.enableException = false;
    m3Hwi.excHandlerFunc = null;

    /*
     * Enable hardware exception generation when dividing by zero.
     *
     * Pick one:
     *  - 0 (default)
     *      Disables hardware exceptions when dividing by zero
     *  - 1
     *      Enables hardware exceptions when dividing by zero
     */
    m3Hwi.nvicCCR.DIV_0_TRP = 0;
    //m3Hwi.nvicCCR.DIV_0_TRP = 1;

    /*
     * Enable hardware exception generation for invalid data alignment.
     *
     * Pick one:
     *  - 0 (default)
     *      Disables hardware exceptions for data alignment
     *  - 1
     *      Enables hardware exceptions for data alignment
     */
    m3Hwi.nvicCCR.UNALIGN_TRP = 0;
    //m3Hwi.nvicCCR.UNALIGN_TRP = 1;

    /*
     * Assign an address for the reset vector.
     *
     * Default is 0x0, which is the start of Flash. Ordinarily this setting should
     * not be changed.
     */
    m3Hwi.resetVectorAddress = 0x0;

    /*
     * Assign an address for the vector table in RAM.
     *
     * The default is the start of RAM. This table is placed in RAM so interrupts
     * can be added at runtime.
     *
     * Note: To change, verify address in the device specific datasheets'
     *     memory map.
     */
    m3Hwi.vectorTableAddress = 0x20000000;



    /* ================ Idle configuration ================ */
    var Idle = xdc.useModule('ti.sysbios.knl.Idle');
    /*
     * The Idle module is used to specify a list of functions to be called when no
     * other tasks are running in the system.
     *
     * Functions added here will be run continuously within the idle task.
     *
     * Function signature:
     *     Void func(Void);
     */
    //Idle.addFunc("&myIdleFunc");



    /* ================ Kernel (SYS/BIOS) configuration ================ */
    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    /*
     * Enable asserts in the BIOS library.
     *
     * Pick one:
     *  - true (default)
     *      Enables asserts for debugging purposes.
     *  - false
     *      Disables asserts for a reduced code footprint and better performance.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //BIOS.assertsEnabled = true;
    BIOS.assertsEnabled = false;

    /*
     * Specify default heap size for BIOS.
     */
    BIOS.heapSize = 1024;

    /*
     * Specify default CPU Frequency.
     */
    BIOS.cpuFreq.lo = 48000000;

    /*
     * A flag to determine if xdc.runtime sources are to be included in a custom
     * built BIOS library.
     *
     * Pick one:
     *  - false (default)
     *      The pre-built xdc.runtime library is provided by the respective target
     *      used to build the application.
     *  - true
     *      xdc.runtime library sources are to be included in the custom BIOS
     *      library. This option yields the most efficient library in both code
     *      footprint and runtime performance.
     */
    //BIOS.includeXdcRuntime = false;
    BIOS.includeXdcRuntime = true;

    /*
     * The SYS/BIOS runtime is provided in the form of a library that is linked
     * with the application. Several forms of this library are provided with the
     * SYS/BIOS product.
     *
     * Pick one:
     *   - BIOS.LibType_Custom
     *      Custom built library that is highly optimized for code footprint and
     *      runtime performance.
     *   - BIOS.LibType_Debug
     *      Custom built library that is non-optimized that can be used to
     *      single-step through APIs with a debugger.
     *
     */
    BIOS.libType = BIOS.LibType_Custom;
    //BIOS.libType = BIOS.LibType_Debug;

    /*
     * Runtime instance creation enable flag.
     *
     * Pick one:
     *   - true (default)
     *      Allows Mod_create() and Mod_delete() to be called at runtime which
     *      requires a default heap for dynamic memory allocation.
     *   - false
     *      Reduces code footprint by disallowing Mod_create() and Mod_delete() to
     *      be called at runtime. Object instances are constructed via
     *      Mod_construct() and destructed via Mod_destruct().
     *
     *  When using BIOS in ROM:
     *      This option must be set to true.
     */
    BIOS.runtimeCreatesEnabled = true;
    //BIOS.runtimeCreatesEnabled = false;

    /*
     * Enable logs in the BIOS library.
     *
     * Pick one:
     *  - true (default)
     *      Enables logs for debugging purposes.
     *  - false
     *      Disables logging for reduced code footprint and improved runtime
     *      performance.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    BIOS.logsEnabled = true;
    //BIOS.logsEnabled = false;

    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    LoggingSetup.loadLoggerSize = 256;
    LoggingSetup.mainLoggerSize = 512;
    LoggingSetup.sysbiosLoggerSize = 1024;
    LoggingSetup.enableContextAwareFunctionProfiler = true;
    var UIABenchmark = xdc.useModule('ti.uia.events.UIABenchmark');


    /* ================ Memory configuration ================ */
    var Memory = xdc.useModule('xdc.runtime.Memory');
    /*
     * The Memory module itself simply provides a common interface for any
     * variety of system and application specific memory management policies
     * implemented by the IHeap modules(Ex. HeapMem, HeapBuf).
     */



    /* ================ Program configuration ================ */
    /*
     *  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 = 768;
    }



    /*
     * Uncomment to enable Semihosting for GNU targets to print to the CCS console.
     * Please read the following TIRTOS Wiki page for more information on Semihosting:
     * processors.wiki.ti.com/.../TI-RTOS_Examples_SemiHosting
     */

    if (Program.build.target.$name.match(/gnu/)) {
        //var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
    }



    /* ================ ROM configuration ================ */
    /*
     * To use BIOS in flash, comment out the code block below.
     */
     /*
    var ROM = xdc.useModule('ti.sysbios.rom.ROM');
    if (Program.cpu.deviceName.match(/CC26/)) {
        ROM.romName = ROM.CC2650;
    }
    else if (Program.cpu.deviceName.match(/CC13/)) {
        ROM.romName = ROM.CC1350;
    }
    */


    /* ================ Semaphore configuration ================ */
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    /*
     * Enables global support for Task priority pend queuing.
     *
     * Pick one:
     *  - true (default)
     *      This allows pending tasks to be serviced based on their task priority.
     *  - false
     *      Pending tasks are services based on first in, first out basis.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //Semaphore.supportsPriority = true;
    Semaphore.supportsPriority = false;

    /*
     * Allows for the implicit posting of events through the semaphore,
     * disable for additional code saving.
     *
     * Pick one:
     *  - true
     *      This allows the Semaphore module to post semaphores and events
     *      simultaneously.
     *  - false (default)
     *      Events must be explicitly posted to unblock tasks.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //Semaphore.supportsEvents = true;
    Semaphore.supportsEvents = false;



    /* ================ Swi configuration ================ */
    var Swi = xdc.useModule('ti.sysbios.knl.Swi');
    /*
     * A software interrupt is an object that encapsulates a function to be
     * executed and a priority. Software interrupts are prioritized, preempt tasks
     * and are preempted by hardware interrupt service routines.
     *
     * This module is included to allow Swi's in a users' application.
     */

    /*
     * Reduce the number of swi priorities from the default of 16.
     * Decreasing the number of swi priorities yields memory savings.
     */
    Swi.numPriorities = 6;



    /* ================ System configuration ================ */
    var System = xdc.useModule('xdc.runtime.System');
    /*
     * The Abort handler is called when the system exits abnormally.
     *
     * Pick one:
     *  - System.abortStd (default)
     *      Call the ANSI C Standard 'abort()' to terminate the application.
     *  - System.abortSpin
     *      A lightweight abort function that loops indefinitely in a while(1) trap
     *      function.
     *  - A custom abort handler
     *      A user-defined function. See the System module documentation for
     *      details.
     */
    //System.abortFxn = System.abortStd;
    System.abortFxn = System.abortSpin;
    //System.abortFxn = "&myAbortSystem";

    /*
     * The Exit handler is called when the system exits normally.
     *
     * Pick one:
     *  - System.exitStd (default)
     *      Call the ANSI C Standard 'exit()' to terminate the application.
     *  - System.exitSpin
     *      A lightweight exit function that loops indefinitely in a while(1) trap
     *      function.
     *  - A custom exit function
     *      A user-defined function. See the System module documentation for
     *      details.
     */
    //System.exitFxn = System.exitStd;
    System.exitFxn = System.exitSpin;
    //System.exitFxn = "&myExitSystem";

    /*
     * Minimize exit handler array in the System module. The System module includes
     * an array of functions that are registered with System_atexit() which is
     * called by System_exit(). The default value is 8.
     */
    System.maxAtexitHandlers = 2;

    /*
     * The System.SupportProxy defines a low-level implementation of System
     * functions such as System_printf(), System_flush(), etc.
     *
     * Pick one pair:
     *  - SysMin
     *      This module maintains an internal configurable circular buffer that
     *      stores the output until System_flush() is called.
     *      The size of the circular buffer is set via SysMin.bufSize.
     *  - SysCallback
     *      SysCallback allows for user-defined implementations for System APIs.
     *      The SysCallback support proxy has a smaller code footprint and can be
     *      used to supply custom System_printf services.
     *      The default SysCallback functions point to stub functions. See the
     *      SysCallback module's documentation.
     */
    var SysMin = xdc.useModule('xdc.runtime.SysMin');
    SysMin.bufSize = 128;
    System.SupportProxy = SysMin;
    //var SysCallback = xdc.useModule('xdc.runtime.SysCallback');
    //System.SupportProxy = SysCallback;
    //SysCallback.abortFxn = "&myUserAbort";
    //SysCallback.exitFxn  = "&myUserExit";
    //SysCallback.flushFxn = "&myUserFlush";
    //SysCallback.putchFxn = "&myUserPutch";
    //SysCallback.readyFxn = "&myUserReady";



    /* ================ Task configuration ================ */
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    /*
     * Check task stacks for overflow conditions.
     *
     * Pick one:
     *  - true (default)
     *      Enables runtime checks for task stack overflow conditions during
     *      context switching ("from" and "to")
     *  - false
     *      Disables runtime checks for task stack overflow conditions.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //Task.checkStackFlag = true;
    Task.checkStackFlag = false;

    /*
     * Set the default task stack size when creating tasks.
     *
     * The default is dependent on the device being used. Reducing the default stack
     * size yields greater memory savings.
     */
    Task.defaultStackSize = 512;

    /*
     * Enables the idle task.
     *
     * Pick one:
     *  - true (default)
     *      Creates a task with priority of 0 which calls idle hook functions. This
     *      option must be set to true to gain power savings provided by the Power
     *      module.
     *  - false
     *      No idle task is created. This option consumes less memory as no
     *      additional default task stack is needed.
     *      To gain power savings by the Power module without having the idle task,
     *      add Idle.run as the Task.allBlockedFunc.
     */
    Task.enableIdleTask = true;
    //Task.enableIdleTask = false;
    //Task.allBlockedFunc = Idle.run;

    /*
     * If Task.enableIdleTask is set to true, this option sets the idle task's
     * stack size.
     *
     * Reducing the idle stack size yields greater memory savings.
     */
    Task.idleTaskStackSize = 512;

    /*
     * Reduce the number of task priorities.
     * The default is 16.
     * Decreasing the number of task priorities yield memory savings.
     */
    Task.numPriorities = 4;



    /* ================ Text configuration ================ */
    var Text = xdc.useModule('xdc.runtime.Text');
    /*
     * These strings are placed in the .const section. Setting this parameter to
     * false will save space in the .const section. Error, Assert and Log messages
     * will print raw ids and args instead of a formatted message.
     *
     * Pick one:
     *  - true (default)
     *      This option loads test string into the .const for easier debugging.
     *  - false
     *      This option reduces the .const footprint.
     */
    //Text.isLoaded = true;
    Text.isLoaded = false;



    /* ================ Types configuration ================ */
    var Types = xdc.useModule('xdc.runtime.Types');
    /*
     * This module defines basic constants and types used throughout the
     * xdc.runtime package.
     */



    /* ================ TI-RTOS middleware configuration ================ */
    var mwConfig = xdc.useModule('ti.mw.Config');
    /*
     * Include TI-RTOS middleware libraries
     */



    /* ================ TI-RTOS drivers' configuration ================ */
    var driversConfig = xdc.useModule('ti.drivers.Config');
    /*
     * Include TI-RTOS drivers
     *
     * Pick one:
     *  - driversConfig.LibType_NonInstrumented (default)
     *      Use TI-RTOS drivers library optimized for footprint and performance
     *      without asserts or logs.
     *  - driversConfig.LibType_Instrumented
     *      Use TI-RTOS drivers library for debugging with asserts and logs enabled.
     */
    driversConfig.libType = driversConfig.LibType_NonInstrumented;
    //driversConfig.libType = driversConfig.LibType_Instrumented;



    /* ================ Application Specific Instances ================ */

    Also the "Inadequate Instrumentation" Warning should probably be marked as a bug in CCS ?

    Thanks

    Peter

  • Hi Peter,

    It could be that your log buffers are too small, and that is causing the out of sequence data:


        LoggingSetup.mainLoggerSize = 512;


    The function profiling and UIABenchmark events are logged to the Main logger.  If the buffer is too small, you will see gaps when Log event with the next sequence number from the last one displayed in System Analyzer, is overwritten be newer events.

    You can get rid of the "Inadequate" warning for Duration Analysis by adding the following line to your .cfg file:

        LoggingSetup.benchmarkLogging = true;

    Best regards,

    Janet

  • Hi Janet

    Great, thanks !

    What would be a reasonable logger size on the CC2650STK ?

    Thanks

    Peter

  • Hi Peter,

    Each Log_writeUC3() puts 32 bytes into the Log buffer (assuming 64-bit timestamp).  So for each function enter/exit, that's 64 bytes.  It would depend on how many function calls you are making, and how often you halt the target so System Analyzer can upload the logs.

    Best regards,

    Janet

  • Hi Janet

    This is weird , I had only on start/stop call , so only 64 bytes were logged ...

    In the meantime if have lost access:

    [Start: Texas Instruments XDS110 USB Debug Probe]

    Execute the command:

    %ccs_base%/common/uscif/dbgjtag -f %boarddatafile% -rv -o -S integrity

    [Result]


    -----[Print the board config pathname(s)]------------------------------------

    /home/p/.ti/ccs910/0/0/BrdDat/testBoard.dat

    -----[Print the reset-command software log-file]-----------------------------

    This utility has selected a 100- or 510-class product.
    This utility will load the adapter 'libjioxds110.so'.
    The library build date was 'Jun  3 2019'.
    The library build time was '15:03:57'.
    The library package version is '8.2.0.00004'.
    The library component version is '35.35.0.0'.
    The controller does not use a programmable FPGA.
    The controller has a version number of '5' (0x00000005).
    The controller has an insertion length of '0' (0x00000000).
    This utility will attempt to reset the controller.
    This utility has successfully reset the controller.

    -----[Print the reset-command hardware log-file]-----------------------------

    The scan-path will be reset by toggling the JTAG TRST signal.
    The controller is the XDS110 with USB interface.
    The link from controller to target is direct (without cable).
    The software is configured for XDS110 features.
    The controller cannot monitor the value on the EMU[0] pin.
    The controller cannot monitor the value on the EMU[1] pin.
    The controller cannot control the timing on output pins.
    The controller cannot control the timing on input pins.
    The scan-path link-delay has been set to exactly '0' (0x0000).

    -----[An error has occurred and this utility has aborted]--------------------

    This error is generated by TI's USCIF driver or utilities.

    The value is '-230' (0xffffff1a).
    The title is 'SC_ERR_PATH_MEASURE'.

    The explanation is:
    The measured lengths of the JTAG IR and DR scan-paths are invalid.
    This indicates that an error exists in the link-delay or scan-path.

    [End: Texas Instruments XDS110 USB Debug Probe]

    From what I have learned by browsing the forum , I might have bricked my device, whatever that means.

    I am on Linux, what flash erase procedure would you recommend ?

    Thanks

    Peter

  • Hi Peter,

    I'm not sure about the emulator error you are getting.  You could try turning off profiling (you can still do benchmarking with UIABenchmark), by setting in your .cfg file:

    LoggingSetup.enableContextAwareFunctionProfiler = false;

    Best regards,

    Janet

  • Hi Janet

    I currently have several issues with the Sensor Tags when debugging under Linux, I purchased a couple of CC1352 LaunchPads where I will test the SA.

    I'll be back ....

    Kind regards

    Peter

  • Hi Janet

    I have now received the SensorTag DevPack and the log configuration works as expected. There seems to be an issue when using the XDS110 standalone probe with the Sensor Tags.

    Kind regards

    Peter