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.

Sys/BIOS RTA on MSP430F5324 refuses to work.

Other Parts Discussed in Thread: MSP430F5324, SYSBIOS, MSP430F5328

Despite our sincerest effort the RTA analysis tools do not work on the MSP430F5324. 

Is this a limitation of Sys/BIOS on MSP? 

We have enabled RTA tools etc. but the RTA menu when debugging only shows "Legacy" mode instead of the current tools. We are using bios_6_34_02_18.

  • Hello Mohammed,

    How are you enabling the RTA tools?  Are you using the RTA Agent?  If so, that may be why you are only seeing the "Legacy" tools.  System Analyzer with UIA is now the recommended way to view instrumentation data for SYS/BIOS.  You can do this by adding the following code to your .cfg file:

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

    (Make sure to remove the RTA Agent from your config file).
    If you need to adjust logger buffer sizes to get your program to fit into memory, you can add code like this to your .cfg file:

    LoggingSetup.loadLoggerSize = 512;
    LoggingSetup.mainLoggerSize = 512;
    LoggingSetup.sysbiosLoggerSize = 512;

    In addition you must add System Analyzer to your project settings:  Select the "RTSC" tab under Project -> Properties
    Check the "System Analyzer (UIA Target)" box.

    Also, what version of CCS are you using?  I had issues with older versions of CCS (5.3) where System Analyzer did not auto-detect the UIA configuration for MSP430, but I have not had this problem with CCS 5.4.

    Best regards,

        Janet

  • Janet,

    Thanks for your valuable response. I was using the RTA agent as my information was based on the SysBios tutorial videos!  They sure need to be updated!

    I am using CCS 5.3 and it was the latest when we started. 

    I've now removed the RTA agent and used the UIA Logger as suggested by you. 

    I am not sure what Event upload mode to use. Will JTAGRUNMODE provide real time data without pausing the application? Or should I use JTAGSTOPMODE. Although I have chosen JTAGRUNMODE it seems the graphs only update when I pause.

    What tools should be available for analysis? I can see the tools under the "Graph"  (Siingle Time, Double Time, FFT etc.) I am not sure I understand them. Is there a proper tutorial accessible for all these new things.

    I do not see any RTOS tools or the sub menu. Infact the RTOS submenu no longer opens.

    Thanks in advance!

  • Mohammed,

    I would use JTAGSTOPMODE for the upload mode.  I'm not sure if JTAGRUNMODE is supported on the MSP430. Your graphs will then update when the target halts.  Under the Tools menu, do you see an "RTOS Analyzer" menu item?  That should have CPU load, Execution graph, etc.  I think, equivalently, you can try
    Tools -> System Analyzer -> Live and you should see a window like the one below.  If you don't see anything in the table under "Instrumentation (UIA) Config", then there is something wrong.  This can happen if you don't have instrumentation enabled in your configuration file (ie, you did add xdc.useModule('ti.uia.sysbios.LoggingSetup').  But I also ran into this issue with System Analyzer failing to auto-detect the UIA configuration for MSP430 when I was using CCS 5.3.0.00042.  If that is also the problem you are having, you could either try to create the UIA config file, or move to CCS 5.4.

    You might also find this link on System Analyzer useful:

    http://processors.wiki.ti.com/index.php/Multicore_System_Analyzer

    It has links to System Analyzer tutorials and documentation.

    Best regards,

        Janet

  • Mohammed,

    Sorry, but my picture did not upload, even though it appeared in my editing window.  Here is what was in the UIA config table:

    Cores      Intrumented  Symbol File      Timstamp Freq (MHz) Cycles per tick
    ------------------------------------------------------------------------------------------------------
    MSP430  yes                  C:\Users\...               8                                  1
    ------------------------------------------------------------------------------------------------------

    The symbol file is just the path to the .out file.

    Best regards,

        Janet

  • Janet,

    After trying a lot on 5.3, I finally abandoned it and installed 5.4. Now I see all the menu items you are talking about and also the views, but no data ! No matter if I pause execution or stop execution and no matter what check boxes I check in the UIA Config screen.

    I do see this error 

    out of memory: heap=0x0, size=28
    xdc.runtime.Error.raise: terminating execution

    I am not sure if this causes the problem because I've always been seeing this error even before I added instrumentation.

    Any thoughts ?

    Actually "Terminating Execution" is not the error I see generally and it seems the CPU is being halted. 

    I have eliminated tasks and only kept "Enable Load Logging" checked. still the CPU is halted with the same error "xdc.runtime.Error.raise: terminating execution". What does this mean ?

  • Mohammed,

    Yes, your program has terminated due to a memory allocation failure.  You could use Tools -> RTOS Object View (ROV) to see how big your heap is.  You might also want to disable instrumentation until you get your program to run without the memory allocation error.  It looks like the particular device you are using (MSP430F55324) doesn't have very much RAM, however.  Have you tried running one of the BIOS examples to see if that works without getting the allocation error?

    Best regards,

        Janet

  • Janet,

    Our application does not itself use Heap. When I remove the Logger Setup the application runs fine and we have been 'debugging' it using Launchpad as the ISP. After I add Logger Setup (with only "Enable Load Logging" checked to reduce memory requirement) the application stops running with this error. Note that we have not even added any Heap type from SysBIOS. I assume if XDC needed it, it would enforce it ? Should I add heap to enable LogSetup to work? What type of Heap would be required and how much minimum? 

  • Mohammed,

    The LoggerStopMode (the Logger used when you have LoggingSetup configured to use JTAGSTOPMODE) code is allocating a buffer, so you would need a heap.  Could you please post the .cfg file you are using?  Then I could see what needs to be changed to get LoggingSetup to work correctly.

    Best regards,

        Janet

  • Janet,

    I added Heap to SysBIOS and now the execution does not fail, and there is no xdc exception, however the graphs etc. do not show any data when I pause or stop.

    As requested I am providing the changes done to the cfg file for enabling execution logging below. I've tried options of enabling and disabling Task Logging and Application Logging but with no impact on the outcome.

    **********************************************************************

    var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    var Load = xdc.useModule('ti.sysbios.utils.Load');

    LoggingSetup.sysbiosTaskLogging = true;
    LoggingSetup.sysbiosTaskLoggingRuntimeControl = true;
    LoggingSetup.mainLogging = true;
    LoggingSetup.mainLoggingRuntimeControl = true;
    LoggingSetup.loadLoggingRuntimeControl = true;
    Load.hwiEnabled = true;
    Load.swiEnabled = true;
    LoggingSetup.sysbiosLoggerSize = 512;
    LoggingSetup.mainLoggerSize = 512;

    **********************************************************************

  • Hello Mohammed,

    I would need to know what else is in your .cfg file to know why you're not getting any data in the execution graph.  For example, if I start with the SYS/BIOS task mutex example (under the SYS/BIOS Generic Examples folder in the TI Resource explorer), and add the Logging setup code you have posted to mutex.cfg, I get data in the execution graph.  However, if I start with the MSP430 task example (under the SYS/BIOS MSP430 Examples folder), and add that code to task.cfg, I don't get any data in the execution graph. In order to fix that problem, I had to remove this line from task.cfg:

    BIOS.logsEnabled = false;

    So, could you check that you don't have that line in your .cfg file, and if not, maybe post the entire .cfg file?

    Thanks,

        Janet

  • My Woes have not ended.

    After giving up for a long time, I tried again as I desperately need to figure out the cause of slow down and missed events.

    Removed LoggerBuf,

    Added LoggingSetup.

    Execute  and ....

    out of memory: heap=0x0, size=28
    xdc.runtime.Error.raise: terminating execution

    Here is the CFG file as well.


    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 SysMin = xdc.useModule('xdc.runtime.SysMin');
    var System = xdc.useModule('xdc.runtime.System');
    var Text = xdc.useModule('xdc.runtime.Text');
    
    var Hwi = xdc.useModule('ti.sysbios.family.msp430.Hwi');
    var ti_sysbios_hal_Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var ClockFreqs = xdc.useModule('ti.sysbios.family.msp430.ClockFreqs');
    var Boot = xdc.useModule('ti.catalog.msp430.init.Boot');
    var Swi = xdc.useModule('ti.sysbios.knl.Swi');
    var TimestampProvider = xdc.useModule('ti.sysbios.family.msp430.TimestampProvider');
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    
    /* 
     * Program.argSize sets the size of the .args section. 
     * The examples don't use command line args so argSize is set to 0.
     */
    Program.argSize = 0x0;
    
    /*
     * Uncomment this line to globally disable Asserts.
     * All modules inherit the default from the 'Defaults' module.  You
     * can override these defaults on a per-module basis using Module.common$. 
     * Disabling Asserts will save code space and improve runtime performance.
    Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
     */
    
    /*
     * Uncomment this line to keep module names from being 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;
     */
    
    /*
     * Comment this line out if you want to dynamically create instance
     * objects.
     */
    Defaults.common$.memoryPolicy = xdc.module("xdc.runtime.Types").STATIC_POLICY;
    
    /*
     * 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 = 4;       
    
    /* 
     * Uncomment this line to disable the Error print function.  
     * We lose error information when this is disabled since the errors are
     * not printed.  Disabling the raiseHook will save some code space if
     * your app is not using System_printf() since the Error_print() function
     * calls System_printf().
    Error.raiseHook = null;
     */
    
    /* 
     * Uncomment this line to keep Error, Assert, and Log strings from being
     * loaded on the target.  These strings are placed in the .const section.
     * Setting this parameter to false will save space in the .const section.
     * Error, Assert and Log message will print raw ids and args instead of
     * a formatted message.
    Text.isLoaded = false;
     */
    
    /*
     * Uncomment this line to disable the output of characters by SysMin
     * when the program exits.  SysMin writes characters to a circular buffer.
     * This buffer can be viewed using the SysMin Output view in ROV.
    SysMin.flushAtExit = false;
     */
    
    /*
     * Use SysMin for output (System_printf() and error messages) and
     * minimize the output buffer size to save data space.
     */
    System.SupportProxy = SysMin;
    SysMin.bufSize = 80;
    
    Main.common$.diags_INFO = Diags.ALWAYS_ON;
    
    /* System stack size (used by ISRs and Swis) */
    Program.stack = 0x200;
    
    /*
     * Application specific 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.swiEnabled = true;
    BIOS.taskEnabled = true;
    BIOS.clockEnabled = true;
    
    /* Minimize system heap */
    BIOS.heapSize = 0;
    
    /* Use Custom BIOS lib to achieve minimal footprint */
    BIOS.libType = BIOS.LibType_Custom;
    
    /* Create a task with priority 1 */
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    
    /* Inhibit the creation of a task to run idle functions */
    Task.enableIdleTask = false;
    
    /* Allow SYS/BIOS to idle the CPU while waiting for an interrupt */
    var Power = xdc.useModule('ti.sysbios.family.msp430.Power');
    
    /* 
     * Create a binary semaphore for the timer ISR to use to 
     * signal the pended task every 10 ticks 
     */
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    
    /*
     * Build a custom BIOS library.  The custom library will be smaller than the
     * pre-built "instrumented" (default) and "non-instrumented" libraries.
     *
     * The BIOS.logsEnabled parameter specifies whether the Logging is enabled
     * within BIOS for this custom build.  These logs are used by the RTA and
     * UIA analysis tools.
     *
     * The BIOS.assertsEnabled parameter specifies whether BIOS code will
     * include Assert() checks.  Setting this parameter to 'false' will generate
     * smaller and faster code, but having asserts enabled is recommended for
     * early development as the Assert() checks will catch lots of programming
     * errors (invalid parameters, etc.)
     */
    BIOS.libType = BIOS.LibType_Custom;
    BIOS.logsEnabled = false;
    BIOS.assertsEnabled = true;
    var hwi0Params = new Hwi.Params();
    hwi0Params.instance.name = "hwiPort2";
    Program.global.hwiPort2 = Hwi.create(42, "&fnHwiPort2", hwi0Params);
    var task0Params = new Task.Params();
    task0Params.instance.name = "tskRadioTransmit";
    task0Params.vitalTaskFlag = false;
    Program.global.tskRadioTransmit = Task.create("&fnTskRadioTransmit", task0Params);
    var task1Params = new Task.Params();
    task1Params.instance.name = "tskExecuteCommand";
    task1Params.vitalTaskFlag = false;
    Program.global.tskExecuteCommand = Task.create("&fnTskExecuteCommand", task1Params);
    var semaphore0Params = new Semaphore.Params();
    semaphore0Params.instance.name = "semProcessRadioMessage";
    semaphore0Params.mode = Semaphore.Mode_BINARY_PRIORITY;
    Program.global.semProcessRadioMessage = Semaphore.create(null, semaphore0Params);
    var task2Params = new Task.Params();
    task2Params.instance.name = "tskProcessRadioMessage";
    task2Params.vitalTaskFlag = false;
    Program.global.tskProcessRadioMessage = Task.create("&fnTskProcessRadioMessage", task2Params);
    var semaphore1Params = new Semaphore.Params();
    semaphore1Params.instance.name = "semExecuteCommand";
    semaphore1Params.mode = Semaphore.Mode_BINARY_PRIORITY;
    Program.global.semExecuteCommand = Semaphore.create(null, semaphore1Params);
    var task3Params = new Task.Params();
    task3Params.instance.name = "tskDisplayParameters";
    task3Params.vitalTaskFlag = false;
    task3Params.priority = 1;
    task3Params.stackSize = 512;
    Program.global.tskDisplayParameters = Task.create("&fnTskDisplayParameters", task3Params);
    var hwi2Params = new Hwi.Params();
    hwi2Params.instance.name = "hwiADC12";
    Program.global.hwiADC12 = Hwi.create(54, "&fnHwiADC12", hwi2Params);
    var task4Params = new Task.Params();
    task4Params.instance.name = "tskMockDrill";
    task4Params.vitalTaskFlag = false;
    task4Params.stackSize = 512;
    Program.global.tskMockDrill = Task.create("&fnTskMockDrill", task4Params);
    Clock.timerId = 2;
    ClockFreqs.SMCLK = 24969216;
    Boot.configureDCO = false;
    ClockFreqs.ACLK = 32768;
    BIOS.cpuFreq.lo = 24969216;
    var hwi2Params0 = new Hwi.Params();
    hwi2Params0.instance.name = "hwiUARTA1";
    Program.global.hwiUARTA1 = Hwi.create(46, "&fnHwiUARTA1", hwi2Params0);
    var clock0Params = new Clock.Params();
    clock0Params.instance.name = "clkReadSensors";
    clock0Params.period = 2;
    clock0Params.startFlag = true;
    Program.global.clkReadSensors = Clock.create("&fnClkReadSensors", 100, clock0Params);
    var clock1Params = new Clock.Params();
    clock1Params.instance.name = "clkSetAbsolutePosition";
    clock1Params.period = 2;
    Program.global.clkSetAbsolutePosition = Clock.create("&fnClkSetAbsolutePosition", 2, clock1Params);
    var hwi3Params = new Hwi.Params();
    hwi3Params.instance.name = "hwiPort1";
    Program.global.hwiPort1 = Hwi.create(47, "&fnHwiPort1", hwi3Params);
    var semaphore2Params = new Semaphore.Params();
    semaphore2Params.instance.name = "semTransmitNow";
    semaphore2Params.mode = Semaphore.Mode_BINARY_PRIORITY;
    Program.global.semTransmitNow = Semaphore.create(null, semaphore2Params);
    

    If I try to add HeapMem module, with or without removing 'Memory' module, I get the following error

    #10099-D</a> program will not fit into available memory. placement with alignment fails for section ".cinit" size 0x48f . Available memory ranges: lnk_msp430f5328.cmd /Automate-Actuator line 144 C/C++ Problem

    I am using the 5328 and no longer using the 5324.

  • Hi Mohammed,

    Could you please try adding the following to your configuration file?

    var Load = xdc.useModule('ti.sysbios.utils.Load');
    Load.taskEnabled = false;

    I think wat is happening is that LoggingSetup is bringing in the Load module which has Task load logging enabled by default.  If you are using an older version of BIOS, Task load logging brings in some code that allocates memory at runtime.  So if you don't have a heap, you would get that assertion.

    Best regards,

        Janet

  • I did what you said about adding the Load module and turning off Task Load and the error did go away and everything started working EXCEPT there is no data !

    SYS/BIOS version is 6.35.1.29

    XDC version is 3.25.0.48

    UIA version is 1.3.0.02

    I am attaching a word document with several screen shots and the current CFG file for your consideration.

    1754.Screenshots.docx

    And here is the CFG file.

    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 SysMin = xdc.useModule('xdc.runtime.SysMin');
    var System = xdc.useModule('xdc.runtime.System');
    var Text = xdc.useModule('xdc.runtime.Text');
    
    var Hwi = xdc.useModule('ti.sysbios.family.msp430.Hwi');
    var ti_sysbios_hal_Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var ClockFreqs = xdc.useModule('ti.sysbios.family.msp430.ClockFreqs');
    var Boot = xdc.useModule('ti.catalog.msp430.init.Boot');
    var Swi = xdc.useModule('ti.sysbios.knl.Swi');
    var TimestampProvider = xdc.useModule('ti.sysbios.family.msp430.TimestampProvider');
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    var Load = xdc.useModule('ti.sysbios.utils.Load');
    
    /* 
     * Program.argSize sets the size of the .args section. 
     * The examples don't use command line args so argSize is set to 0.
     */
    Program.argSize = 0x0;
    
    /*
     * Uncomment this line to globally disable Asserts.
     * All modules inherit the default from the 'Defaults' module.  You
     * can override these defaults on a per-module basis using Module.common$. 
     * Disabling Asserts will save code space and improve runtime performance.
    Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
     */
    
    /*
     * Uncomment this line to keep module names from being 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;
     */
    
    /*
     * Comment this line out if you want to dynamically create instance
     * objects.
     */
    Defaults.common$.memoryPolicy = xdc.module("xdc.runtime.Types").STATIC_POLICY;
    
    /*
     * 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 = 4;       
    
    /* 
     * Uncomment this line to disable the Error print function.  
     * We lose error information when this is disabled since the errors are
     * not printed.  Disabling the raiseHook will save some code space if
     * your app is not using System_printf() since the Error_print() function
     * calls System_printf().
    Error.raiseHook = null;
     */
    
    /* 
     * Uncomment this line to keep Error, Assert, and Log strings from being
     * loaded on the target.  These strings are placed in the .const section.
     * Setting this parameter to false will save space in the .const section.
     * Error, Assert and Log message will print raw ids and args instead of
     * a formatted message.
    Text.isLoaded = false;
     */
    
    /*
     * Uncomment this line to disable the output of characters by SysMin
     * when the program exits.  SysMin writes characters to a circular buffer.
     * This buffer can be viewed using the SysMin Output view in ROV.
    SysMin.flushAtExit = false;
     */
    
    /*
     * Use SysMin for output (System_printf() and error messages) and
     * minimize the output buffer size to save data space.
     */
    System.SupportProxy = SysMin;
    SysMin.bufSize = 80;
    
    Main.common$.diags_INFO = Diags.ALWAYS_ON;
    
    /* System stack size (used by ISRs and Swis) */
    Program.stack = 0x200;
    
    /*
     * Application specific 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.swiEnabled = true;
    BIOS.taskEnabled = true;
    BIOS.clockEnabled = true;
    
    /* Minimize system heap */
    BIOS.heapSize = 0;
    
    /* Use Custom BIOS lib to achieve minimal footprint */
    BIOS.libType = BIOS.LibType_Custom;
    
    /* Create a task with priority 1 */
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    
    /* Inhibit the creation of a task to run idle functions */
    Task.enableIdleTask = false;
    
    /* Allow SYS/BIOS to idle the CPU while waiting for an interrupt */
    var Power = xdc.useModule('ti.sysbios.family.msp430.Power');
    
    /* 
     * Create a binary semaphore for the timer ISR to use to 
     * signal the pended task every 10 ticks 
     */
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    
    /*
     * Build a custom BIOS library.  The custom library will be smaller than the
     * pre-built "instrumented" (default) and "non-instrumented" libraries.
     *
     * The BIOS.logsEnabled parameter specifies whether the Logging is enabled
     * within BIOS for this custom build.  These logs are used by the RTA and
     * UIA analysis tools.
     *
     * The BIOS.assertsEnabled parameter specifies whether BIOS code will
     * include Assert() checks.  Setting this parameter to 'false' will generate
     * smaller and faster code, but having asserts enabled is recommended for
     * early development as the Assert() checks will catch lots of programming
     * errors (invalid parameters, etc.)
     */
    BIOS.libType = BIOS.LibType_Custom;
    BIOS.logsEnabled = false;
    BIOS.assertsEnabled = true;
    var hwi0Params = new Hwi.Params();
    hwi0Params.instance.name = "hwiPort2";
    Program.global.hwiPort2 = Hwi.create(42, "&fnHwiPort2", hwi0Params);
    var task0Params = new Task.Params();
    task0Params.instance.name = "tskRadioTransmit";
    task0Params.vitalTaskFlag = false;
    Program.global.tskRadioTransmit = Task.create("&fnTskRadioTransmit", task0Params);
    var task1Params = new Task.Params();
    task1Params.instance.name = "tskExecuteCommand";
    task1Params.vitalTaskFlag = false;
    Program.global.tskExecuteCommand = Task.create("&fnTskExecuteCommand", task1Params);
    var semaphore0Params = new Semaphore.Params();
    semaphore0Params.instance.name = "semProcessRadioMessage";
    semaphore0Params.mode = Semaphore.Mode_BINARY_PRIORITY;
    Program.global.semProcessRadioMessage = Semaphore.create(null, semaphore0Params);
    var task2Params = new Task.Params();
    task2Params.instance.name = "tskProcessRadioMessage";
    task2Params.vitalTaskFlag = false;
    Program.global.tskProcessRadioMessage = Task.create("&fnTskProcessRadioMessage", task2Params);
    var semaphore1Params = new Semaphore.Params();
    semaphore1Params.instance.name = "semExecuteCommand";
    semaphore1Params.mode = Semaphore.Mode_BINARY_PRIORITY;
    Program.global.semExecuteCommand = Semaphore.create(null, semaphore1Params);
    var task3Params = new Task.Params();
    task3Params.instance.name = "tskDisplayParameters";
    task3Params.vitalTaskFlag = false;
    task3Params.priority = 1;
    task3Params.stackSize = 512;
    Program.global.tskDisplayParameters = Task.create("&fnTskDisplayParameters", task3Params);
    var hwi2Params = new Hwi.Params();
    hwi2Params.instance.name = "hwiADC12";
    Program.global.hwiADC12 = Hwi.create(54, "&fnHwiADC12", hwi2Params);
    var task4Params = new Task.Params();
    task4Params.instance.name = "tskMockDrill";
    task4Params.vitalTaskFlag = false;
    task4Params.stackSize = 512;
    Program.global.tskMockDrill = Task.create("&fnTskMockDrill", task4Params);
    Clock.timerId = 2;
    ClockFreqs.SMCLK = 24969216;
    Boot.configureDCO = false;
    ClockFreqs.ACLK = 32768;
    BIOS.cpuFreq.lo = 24969216;
    var hwi2Params0 = new Hwi.Params();
    hwi2Params0.instance.name = "hwiUARTA1";
    Program.global.hwiUARTA1 = Hwi.create(46, "&fnHwiUARTA1", hwi2Params0);
    var clock0Params = new Clock.Params();
    clock0Params.instance.name = "clkReadSensors";
    clock0Params.period = 2;
    clock0Params.startFlag = true;
    Program.global.clkReadSensors = Clock.create("&fnClkReadSensors", 100, clock0Params);
    var clock1Params = new Clock.Params();
    clock1Params.instance.name = "clkSetAbsolutePosition";
    clock1Params.period = 2;
    Program.global.clkSetAbsolutePosition = Clock.create("&fnClkSetAbsolutePosition", 2, clock1Params);
    var hwi3Params = new Hwi.Params();
    hwi3Params.instance.name = "hwiPort1";
    Program.global.hwiPort1 = Hwi.create(47, "&fnHwiPort1", hwi3Params);
    var semaphore2Params = new Semaphore.Params();
    semaphore2Params.instance.name = "semTransmitNow";
    semaphore2Params.mode = Semaphore.Mode_BINARY_PRIORITY;
    Program.global.semTransmitNow = Semaphore.create(null, semaphore2Params);
    Load.updateInIdle = true;
    Load.taskEnabled = false;
    

    NOTE: 

    I am seeing this warning in the Problems pane though:

    BIOS could not determine the timestamp frequency of device. Setting timestamp frequency to cpu frequency.To override this setting, set UIAMetaData.timestampFreq in your configuration (.cfg) file XXXXX.cfg 

    I added

       var UIAMetaData = xdc.useModule('ti.uia.runtime.UIAMetaData');
       UIAMetaData.timestampFreq = 25000000;

    but still the outcome is the same as described above.

  • Hi Mohammed,

    Thanks for sharing the .cfg file.  I can see one problem that would cause Log data to not show up:

    BIOS.logsEnabled = false;

    Could you try removing that line and rebuilding your app?  Also, if you are using power management, your CPU load will not be accurate with that version of BIOS.

    Best regards,

        Janet

  • changing it to true,

    BIOS.logsEnabled = true;

     causes this linking error, sigh!

    #10099-D</a> program will not fit into available memory. placement with alignment fails for section ".cinit" size 0x468 . Available memory ranges: lnk_msp430f5328.cmd 

  • I've disabled "Application Logging"  and enabled Hwi logging in LoggingSetup. LoadLogging is also enabled. In the Load Module "Update during Idle" is checked and averaging period is 500ms

    I am getting data in the LiveSession window now. However none of the "Analysis" windows like CPU Load, etc. show anything. 

    Data in the Live session is like this:

    ,8218920,,MSP430,LM_tick: tick: 6421,Clock_LM_tick,Unknown,,,9828,SYSBIOS System Logger,ti.sysbios.knl.Clock,ti.sysbios.knl.Clock,,,205473,0x1915,0x0,0x0,0x0,,,,,

    ,8220200,,MSP430,LM_tick: tick: 6422,Clock_LM_tick,Unknown,,,9829,SYSBIOS System Logger,ti.sysbios.knl.Clock,ti.sysbios.knl.Clock,,,205505,0x1916,0x0,0x0,0x0,,,,,
    ,8220240,,MSP430,"LM_begin: clk: 0x32cc, func: 0xd01e",Clock_LM_begin,Unknown,,,9830,SYSBIOS System Logger,ti.sysbios.knl.Clock,ti.sysbios.knl.Clock,,,205506,0x32CC,0xD01E,0x0,0x0,,,,,
    ,8221480,,MSP430,LM_tick: tick: 6423,Clock_LM_tick,Unknown,,,9831,SYSBIOS System Logger,ti.sysbios.knl.Clock,ti.sysbios.knl.Clock,,,205537,0x1917,0x0,0x0,0x0,,,,,
    ,8222760,,MSP430,LM_tick: tick: 6424,Clock_LM_tick,Unknown,,,9832,SYSBIOS System Logger,ti.sysbios.knl.Clock,ti.sysbios.knl.Clock,,,205569,0x1918,0x0,0x0,0x0,,,,,
    ,8222800,,MSP430,"LM_begin: clk: 0x32cc, func: 0xd01e",Clock_LM_begin,Unknown,,,9833,SYSBIOS System Logger,ti.sysbios.knl.Clock,ti.sysbios.knl.Clock,,,205570,0x32CC,0xD01E,0x0,0x0,,,,,

  • Despite all this effort, I still cannot see CPU. 

    I have assigned 2048 MAU to SysBIOS Logging, 1024 to SysBios Load Logging and 1024 to Application Logging.

    I get about 62 records per pause most of which are Clock Ticks as shown above. I am getting Task and context switching but not getting and Hwi or Load data. I can see execution graph for the data available in Live session.

    1. Is there any way to get live streaming log data from MSP430F5328 ? JTAG Pause gives last 60 records which is woefully inadequate and also I do not see interrupts despite it being very frequent. 

    2. Here is all the CFG setting related to logging. Can you tell me Why I dont see CPU load and Interrupt events?

    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 SysMin = xdc.useModule('xdc.runtime.SysMin');
    var System = xdc.useModule('xdc.runtime.System');
    var Text = xdc.useModule('xdc.runtime.Text');
    
    var Hwi = xdc.useModule('ti.sysbios.family.msp430.Hwi');
    var ti_sysbios_hal_Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var ClockFreqs = xdc.useModule('ti.sysbios.family.msp430.ClockFreqs');
    var Boot = xdc.useModule('ti.catalog.msp430.init.Boot');
    var Swi = xdc.useModule('ti.sysbios.knl.Swi');
    var TimestampProvider = xdc.useModule('ti.sysbios.family.msp430.TimestampProvider');
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    var Load = xdc.useModule('ti.sysbios.utils.Load');
    
    var UIAMetaData = xdc.useModule('ti.uia.runtime.UIAMetaData');
    UIAMetaData.timestampFreq = 25000000;
    
    
    /* 
     * Program.argSize sets the size of the .args section. 
     * The examples don't use command line args so argSize is set to 0.
     */
    Program.argSize = 0x0;
    
    /*
     * Uncomment this line to globally disable Asserts.
     * All modules inherit the default from the 'Defaults' module.  You
     * can override these defaults on a per-module basis using Module.common$. 
     * Disabling Asserts will save code space and improve runtime performance.
    Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
     */
    
    /*
     * Uncomment this line to keep module names from being 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;
     */
    
    /*
     * Comment this line out if you want to dynamically create instance
     * objects.
     */
    Defaults.common$.memoryPolicy = xdc.module("xdc.runtime.Types").STATIC_POLICY;
    
    /*
     * 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 = 4;       
    
    /* 
     * Uncomment this line to disable the Error print function.  
     * We lose error information when this is disabled since the errors are
     * not printed.  Disabling the raiseHook will save some code space if
     * your app is not using System_printf() since the Error_print() function
     * calls System_printf().
    Error.raiseHook = null;
     */
    
    /* 
     * Uncomment this line to keep Error, Assert, and Log strings from being
     * loaded on the target.  These strings are placed in the .const section.
     * Setting this parameter to false will save space in the .const section.
     * Error, Assert and Log message will print raw ids and args instead of
     * a formatted message.
    Text.isLoaded = false;
     */
    
    /*
     * Uncomment this line to disable the output of characters by SysMin
     * when the program exits.  SysMin writes characters to a circular buffer.
     * This buffer can be viewed using the SysMin Output view in ROV.
    SysMin.flushAtExit = false;
     */
    
    /*
     * Use SysMin for output (System_printf() and error messages) and
     * minimize the output buffer size to save data space.
     */
    System.SupportProxy = SysMin;
    SysMin.bufSize = 80;
    
    
    Main.common$.diags_INFO = Diags.ALWAYS_ON;
    
    /* System stack size (used by ISRs and Swis) */
    Program.stack = 0x200;
    
    /*
     * Application specific 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.swiEnabled = true;
    BIOS.taskEnabled = true;
    BIOS.clockEnabled = true;
    
    /* Minimize system heap */
    BIOS.heapSize = 0;
    
    /* Use Custom BIOS lib to achieve minimal footprint */
    BIOS.libType = BIOS.LibType_Custom;
    
    /* Create a task with priority 1 */
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    
    /* Inhibit the creation of a task to run idle functions */
    Task.enableIdleTask = false;
    
    /* Allow SYS/BIOS to idle the CPU while waiting for an interrupt */
    var Power = xdc.useModule('ti.sysbios.family.msp430.Power');
    
    /* 
     * Create a binary semaphore for the timer ISR to use to 
     * signal the pended task every 10 ticks 
     */
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    
    /*
     * Build a custom BIOS library.  The custom library will be smaller than the
     * pre-built "instrumented" (default) and "non-instrumented" libraries.
     *
     * The BIOS.logsEnabled parameter specifies whether the Logging is enabled
     * within BIOS for this custom build.  These logs are used by the RTA and
     * UIA analysis tools.
     *
     * The BIOS.assertsEnabled parameter specifies whether BIOS code will
     * include Assert() checks.  Setting this parameter to 'false' will generate
     * smaller and faster code, but having asserts enabled is recommended for
     * early development as the Assert() checks will catch lots of programming
     * errors (invalid parameters, etc.)
     */
    BIOS.libType = BIOS.LibType_Custom;
    BIOS.logsEnabled = true;
    BIOS.assertsEnabled = true;
    var hwi0Params = new Hwi.Params();
    hwi0Params.instance.name = "hwiPort2";
    hwi0Params.swiEnabled = false;
    hwi0Params.nestingEnabled = true;
    hwi0Params.threadTypeEnabled = false;
    Program.global.hwiPort2 = Hwi.create(42, "&fnHwiPort2", hwi0Params);
    var task0Params = new Task.Params();
    task0Params.instance.name = "tskRadioTransmit";
    task0Params.vitalTaskFlag = false;
    Program.global.tskRadioTransmit = Task.create("&fnTskRadioTransmit", task0Params);
    var task1Params = new Task.Params();
    task1Params.instance.name = "tskExecuteCommand";
    task1Params.vitalTaskFlag = false;
    Program.global.tskExecuteCommand = Task.create("&fnTskExecuteCommand", task1Params);
    var semaphore0Params = new Semaphore.Params();
    semaphore0Params.instance.name = "semProcessRadioMessage";
    semaphore0Params.mode = Semaphore.Mode_BINARY_PRIORITY;
    Program.global.semProcessRadioMessage = Semaphore.create(null, semaphore0Params);
    var task2Params = new Task.Params();
    task2Params.instance.name = "tskProcessRadioMessage";
    task2Params.vitalTaskFlag = false;
    Program.global.tskProcessRadioMessage = Task.create("&fnTskProcessRadioMessage", task2Params);
    var semaphore1Params = new Semaphore.Params();
    semaphore1Params.instance.name = "semExecuteCommand";
    semaphore1Params.mode = Semaphore.Mode_BINARY_PRIORITY;
    Program.global.semExecuteCommand = Semaphore.create(null, semaphore1Params);
    var task3Params = new Task.Params();
    task3Params.instance.name = "tskDisplayParameters";
    task3Params.vitalTaskFlag = false;
    task3Params.priority = 1;
    task3Params.stackSize = 512;
    Program.global.tskDisplayParameters = Task.create("&fnTskDisplayParameters", task3Params);
    var hwi2Params = new Hwi.Params();
    hwi2Params.instance.name = "hwiADC12";
    hwi2Params.swiEnabled = false;
    hwi2Params.taskEnabled = true;
    hwi2Params.threadTypeEnabled = false;
    hwi2Params.nestingEnabled = true;
    Program.global.hwiADC12 = Hwi.create(54, "&fnHwiADC12", hwi2Params);
    var task4Params = new Task.Params();
    task4Params.instance.name = "tskMockDrill";
    task4Params.vitalTaskFlag = false;
    task4Params.stackSize = 512;
    Program.global.tskMockDrill = Task.create("&fnTskMockDrill", task4Params);
    Clock.timerId = 2;
    ClockFreqs.SMCLK = 24969216;
    Boot.configureDCO = false;
    ClockFreqs.ACLK = 32768;
    BIOS.cpuFreq.lo = 24969216;
    var hwi2Params0 = new Hwi.Params();
    hwi2Params0.instance.name = "hwiUARTA1";
    hwi2Params0.swiEnabled = false;
    hwi2Params0.taskEnabled = true;
    hwi2Params0.threadTypeEnabled = false;
    hwi2Params0.nestingEnabled = true;
    Program.global.hwiUARTA1 = Hwi.create(46, "&fnHwiUARTA1", hwi2Params0);
    var clock0Params = new Clock.Params();
    clock0Params.instance.name = "clkReadSensors";
    clock0Params.period = 2;
    clock0Params.startFlag = true;
    Program.global.clkReadSensors = Clock.create("&fnClkReadSensors", 100, clock0Params);
    var clock1Params = new Clock.Params();
    clock1Params.instance.name = "clkSetAbsolutePosition";
    clock1Params.period = 2;
    Program.global.clkSetAbsolutePosition = Clock.create("&fnClkSetAbsolutePosition", 2, clock1Params);
    var hwi3Params = new Hwi.Params();
    hwi3Params.instance.name = "hwiPort1";
    hwi3Params.threadTypeEnabled = false;
    hwi3Params.swiEnabled = false;
    hwi3Params.taskEnabled = true;
    Program.global.hwiPort1 = Hwi.create(47, "&fnHwiPort1", hwi3Params);
    var semaphore2Params = new Semaphore.Params();
    semaphore2Params.instance.name = "semTransmitNow";
    semaphore2Params.mode = Semaphore.Mode_BINARY_PRIORITY;
    Program.global.semTransmitNow = Semaphore.create(null, semaphore2Params);
    Load.taskEnabled = false;
    LoggingSetup.sysbiosTaskLogging = true;
    LoggingSetup.sysbiosTaskLoggingRuntimeControl = false;
    LoggingSetup.mainLogging = true;
    LoggingSetup.mainLoggingRuntimeControl = false;
    LoggingSetup.loadLoggingRuntimeControl = false;
    LoggingSetup.sysbiosHwiLogging = true;
    Load.hwiEnabled = true;
    LoggingSetup.sysbiosLoggerSize = 2048;
    LoggingSetup.mainLoggerSize = 1024;
    LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_JTAGSTOPMODE;
    LoggingSetup.loadLoggerSize = 1024;
    

  • Despite all this effort, I still cannot see CPU. 

    I have assigned 2048 MAU to SysBIOS Logging, 1024 to SysBios Load Logging and 1024 to Application Logging.

    I get about 62 records per pause most of which are Clock Ticks as shown above. I am getting Task and context switching but not getting and Hwi or Load data. I can see execution graph for the data available in Live session.

    1. Is there any way to get live streaming log data from MSP430F5328 ? JTAG Pause gives last 60 records which is woefully inadequate and also I do not see interrupts despite it being very frequent. 

    2. Here is all the CFG setting related to logging. Can you tell me Why I dont see CPU load and Interrupt events?

    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 SysMin = xdc.useModule('xdc.runtime.SysMin');
    var System = xdc.useModule('xdc.runtime.System');
    var Text = xdc.useModule('xdc.runtime.Text');
    
    var Hwi = xdc.useModule('ti.sysbios.family.msp430.Hwi');
    var ti_sysbios_hal_Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var ClockFreqs = xdc.useModule('ti.sysbios.family.msp430.ClockFreqs');
    var Boot = xdc.useModule('ti.catalog.msp430.init.Boot');
    var Swi = xdc.useModule('ti.sysbios.knl.Swi');
    var TimestampProvider = xdc.useModule('ti.sysbios.family.msp430.TimestampProvider');
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    var Load = xdc.useModule('ti.sysbios.utils.Load');
    
    var UIAMetaData = xdc.useModule('ti.uia.runtime.UIAMetaData');
    UIAMetaData.timestampFreq = 25000000;
    
    
    /* 
     * Program.argSize sets the size of the .args section. 
     * The examples don't use command line args so argSize is set to 0.
     */
    Program.argSize = 0x0;
    
    /*
     * Uncomment this line to globally disable Asserts.
     * All modules inherit the default from the 'Defaults' module.  You
     * can override these defaults on a per-module basis using Module.common$. 
     * Disabling Asserts will save code space and improve runtime performance.
    Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
     */
    
    /*
     * Uncomment this line to keep module names from being 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;
     */
    
    /*
     * Comment this line out if you want to dynamically create instance
     * objects.
     */
    Defaults.common$.memoryPolicy = xdc.module("xdc.runtime.Types").STATIC_POLICY;
    
    /*
     * 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 = 4;       
    
    /* 
     * Uncomment this line to disable the Error print function.  
     * We lose error information when this is disabled since the errors are
     * not printed.  Disabling the raiseHook will save some code space if
     * your app is not using System_printf() since the Error_print() function
     * calls System_printf().
    Error.raiseHook = null;
     */
    
    /* 
     * Uncomment this line to keep Error, Assert, and Log strings from being
     * loaded on the target.  These strings are placed in the .const section.
     * Setting this parameter to false will save space in the .const section.
     * Error, Assert and Log message will print raw ids and args instead of
     * a formatted message.
    Text.isLoaded = false;
     */
    
    /*
     * Uncomment this line to disable the output of characters by SysMin
     * when the program exits.  SysMin writes characters to a circular buffer.
     * This buffer can be viewed using the SysMin Output view in ROV.
    SysMin.flushAtExit = false;
     */
    
    /*
     * Use SysMin for output (System_printf() and error messages) and
     * minimize the output buffer size to save data space.
     */
    System.SupportProxy = SysMin;
    SysMin.bufSize = 80;
    
    
    Main.common$.diags_INFO = Diags.ALWAYS_ON;
    
    /* System stack size (used by ISRs and Swis) */
    Program.stack = 0x200;
    
    /*
     * Application specific 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.swiEnabled = true;
    BIOS.taskEnabled = true;
    BIOS.clockEnabled = true;
    
    /* Minimize system heap */
    BIOS.heapSize = 0;
    
    /* Use Custom BIOS lib to achieve minimal footprint */
    BIOS.libType = BIOS.LibType_Custom;
    
    /* Create a task with priority 1 */
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    
    /* Inhibit the creation of a task to run idle functions */
    Task.enableIdleTask = false;
    
    /* Allow SYS/BIOS to idle the CPU while waiting for an interrupt */
    var Power = xdc.useModule('ti.sysbios.family.msp430.Power');
    
    /* 
     * Create a binary semaphore for the timer ISR to use to 
     * signal the pended task every 10 ticks 
     */
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    
    /*
     * Build a custom BIOS library.  The custom library will be smaller than the
     * pre-built "instrumented" (default) and "non-instrumented" libraries.
     *
     * The BIOS.logsEnabled parameter specifies whether the Logging is enabled
     * within BIOS for this custom build.  These logs are used by the RTA and
     * UIA analysis tools.
     *
     * The BIOS.assertsEnabled parameter specifies whether BIOS code will
     * include Assert() checks.  Setting this parameter to 'false' will generate
     * smaller and faster code, but having asserts enabled is recommended for
     * early development as the Assert() checks will catch lots of programming
     * errors (invalid parameters, etc.)
     */
    BIOS.libType = BIOS.LibType_Custom;
    BIOS.logsEnabled = true;
    BIOS.assertsEnabled = true;
    var hwi0Params = new Hwi.Params();
    hwi0Params.instance.name = "hwiPort2";
    hwi0Params.swiEnabled = false;
    hwi0Params.nestingEnabled = true;
    hwi0Params.threadTypeEnabled = false;
    Program.global.hwiPort2 = Hwi.create(42, "&fnHwiPort2", hwi0Params);
    var task0Params = new Task.Params();
    task0Params.instance.name = "tskRadioTransmit";
    task0Params.vitalTaskFlag = false;
    Program.global.tskRadioTransmit = Task.create("&fnTskRadioTransmit", task0Params);
    var task1Params = new Task.Params();
    task1Params.instance.name = "tskExecuteCommand";
    task1Params.vitalTaskFlag = false;
    Program.global.tskExecuteCommand = Task.create("&fnTskExecuteCommand", task1Params);
    var semaphore0Params = new Semaphore.Params();
    semaphore0Params.instance.name = "semProcessRadioMessage";
    semaphore0Params.mode = Semaphore.Mode_BINARY_PRIORITY;
    Program.global.semProcessRadioMessage = Semaphore.create(null, semaphore0Params);
    var task2Params = new Task.Params();
    task2Params.instance.name = "tskProcessRadioMessage";
    task2Params.vitalTaskFlag = false;
    Program.global.tskProcessRadioMessage = Task.create("&fnTskProcessRadioMessage", task2Params);
    var semaphore1Params = new Semaphore.Params();
    semaphore1Params.instance.name = "semExecuteCommand";
    semaphore1Params.mode = Semaphore.Mode_BINARY_PRIORITY;
    Program.global.semExecuteCommand = Semaphore.create(null, semaphore1Params);
    var task3Params = new Task.Params();
    task3Params.instance.name = "tskDisplayParameters";
    task3Params.vitalTaskFlag = false;
    task3Params.priority = 1;
    task3Params.stackSize = 512;
    Program.global.tskDisplayParameters = Task.create("&fnTskDisplayParameters", task3Params);
    var hwi2Params = new Hwi.Params();
    hwi2Params.instance.name = "hwiADC12";
    hwi2Params.swiEnabled = false;
    hwi2Params.taskEnabled = true;
    hwi2Params.threadTypeEnabled = false;
    hwi2Params.nestingEnabled = true;
    Program.global.hwiADC12 = Hwi.create(54, "&fnHwiADC12", hwi2Params);
    var task4Params = new Task.Params();
    task4Params.instance.name = "tskMockDrill";
    task4Params.vitalTaskFlag = false;
    task4Params.stackSize = 512;
    Program.global.tskMockDrill = Task.create("&fnTskMockDrill", task4Params);
    Clock.timerId = 2;
    ClockFreqs.SMCLK = 24969216;
    Boot.configureDCO = false;
    ClockFreqs.ACLK = 32768;
    BIOS.cpuFreq.lo = 24969216;
    var hwi2Params0 = new Hwi.Params();
    hwi2Params0.instance.name = "hwiUARTA1";
    hwi2Params0.swiEnabled = false;
    hwi2Params0.taskEnabled = true;
    hwi2Params0.threadTypeEnabled = false;
    hwi2Params0.nestingEnabled = true;
    Program.global.hwiUARTA1 = Hwi.create(46, "&fnHwiUARTA1", hwi2Params0);
    var clock0Params = new Clock.Params();
    clock0Params.instance.name = "clkReadSensors";
    clock0Params.period = 2;
    clock0Params.startFlag = true;
    Program.global.clkReadSensors = Clock.create("&fnClkReadSensors", 100, clock0Params);
    var clock1Params = new Clock.Params();
    clock1Params.instance.name = "clkSetAbsolutePosition";
    clock1Params.period = 2;
    Program.global.clkSetAbsolutePosition = Clock.create("&fnClkSetAbsolutePosition", 2, clock1Params);
    var hwi3Params = new Hwi.Params();
    hwi3Params.instance.name = "hwiPort1";
    hwi3Params.threadTypeEnabled = false;
    hwi3Params.swiEnabled = false;
    hwi3Params.taskEnabled = true;
    Program.global.hwiPort1 = Hwi.create(47, "&fnHwiPort1", hwi3Params);
    var semaphore2Params = new Semaphore.Params();
    semaphore2Params.instance.name = "semTransmitNow";
    semaphore2Params.mode = Semaphore.Mode_BINARY_PRIORITY;
    Program.global.semTransmitNow = Semaphore.create(null, semaphore2Params);
    Load.taskEnabled = false;
    LoggingSetup.sysbiosTaskLogging = true;
    LoggingSetup.sysbiosTaskLoggingRuntimeControl = false;
    LoggingSetup.mainLogging = true;
    LoggingSetup.mainLoggingRuntimeControl = false;
    LoggingSetup.loadLoggingRuntimeControl = false;
    LoggingSetup.sysbiosHwiLogging = true;
    Load.hwiEnabled = true;
    LoggingSetup.sysbiosLoggerSize = 2048;
    LoggingSetup.mainLoggerSize = 1024;
    LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_JTAGSTOPMODE;
    LoggingSetup.loadLoggerSize = 1024;
    
  • Hi Mohammed,

    If you want to see CPU load, you will need to remove this line from your .cfg file:

    /* Allow SYS/BIOS to idle the CPU while waiting for an interrupt */
    var Power = xdc.useModule('ti.sysbios.family.msp430.Power');

    There is no way to get live Log data from the MSP430.  You can only see Log data when the target halts.

    Best regards,

        Janet

  • Okay. 

    Any reason you can think of why I am not seeing the interrupt events in the live analyzer window? I do see task events. 

  • Despite removing the line for Power Module, I am not seeing the CPU Load and I am not seeing interrupt events even though  SYSBIOS Hwi has been checked. Are there any known bugs causing this? I have high frequency Hwi interrupt and desipte many tries over different durations of time and despite pausing execution while interrupts were happening, nothing was reported. 

  • Hi Mohammed,

    Could you please attach your latest .cfg file where you are not getting Hwi events?

    Thanks,

        Janet

  • 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 SysMin = xdc.useModule('xdc.runtime.SysMin');
    var System = xdc.useModule('xdc.runtime.System');
    var Text = xdc.useModule('xdc.runtime.Text');
    
    var Hwi = xdc.useModule('ti.sysbios.family.msp430.Hwi');
    var ti_sysbios_hal_Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var ClockFreqs = xdc.useModule('ti.sysbios.family.msp430.ClockFreqs');
    var Boot = xdc.useModule('ti.catalog.msp430.init.Boot');
    var Swi = xdc.useModule('ti.sysbios.knl.Swi');
    var TimestampProvider = xdc.useModule('ti.sysbios.family.msp430.TimestampProvider');
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    var Load = xdc.useModule('ti.sysbios.utils.Load');
    
    var UIAMetaData = xdc.useModule('ti.uia.runtime.UIAMetaData');
    UIAMetaData.timestampFreq = 25000000;
    
    
    /* 
     * Program.argSize sets the size of the .args section. 
     * The examples don't use command line args so argSize is set to 0.
     */
    Program.argSize = 0x0;
    
    /*
     * Uncomment this line to globally disable Asserts.
     * All modules inherit the default from the 'Defaults' module.  You
     * can override these defaults on a per-module basis using Module.common$. 
     * Disabling Asserts will save code space and improve runtime performance.
    Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
     */
    
    /*
     * Uncomment this line to keep module names from being 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;
     */
    
    /*
     * Comment this line out if you want to dynamically create instance
     * objects.
     */
    Defaults.common$.memoryPolicy = xdc.module("xdc.runtime.Types").STATIC_POLICY;
    
    /*
     * 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 = 4;       
    
    /* 
     * Uncomment this line to disable the Error print function.  
     * We lose error information when this is disabled since the errors are
     * not printed.  Disabling the raiseHook will save some code space if
     * your app is not using System_printf() since the Error_print() function
     * calls System_printf().
    Error.raiseHook = null;
     */
    
    /* 
     * Uncomment this line to keep Error, Assert, and Log strings from being
     * loaded on the target.  These strings are placed in the .const section.
     * Setting this parameter to false will save space in the .const section.
     * Error, Assert and Log message will print raw ids and args instead of
     * a formatted message.
    Text.isLoaded = false;
     */
    
    /*
     * Uncomment this line to disable the output of characters by SysMin
     * when the program exits.  SysMin writes characters to a circular buffer.
     * This buffer can be viewed using the SysMin Output view in ROV.
    SysMin.flushAtExit = false;
     */
    
    /*
     * Use SysMin for output (System_printf() and error messages) and
     * minimize the output buffer size to save data space.
     */
    System.SupportProxy = SysMin;
    SysMin.bufSize = 80;
    
    
    Main.common$.diags_INFO = Diags.ALWAYS_ON;
    
    /* System stack size (used by ISRs and Swis) */
    Program.stack = 0x200;
    
    /*
     * Application specific 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.swiEnabled = true;
    BIOS.taskEnabled = true;
    BIOS.clockEnabled = true;
    
    /* Minimize system heap */
    BIOS.heapSize = 0;
    
    /* Use Custom BIOS lib to achieve minimal footprint */
    BIOS.libType = BIOS.LibType_Custom;
    
    /* Create a task with priority 1 */
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    
    /* Inhibit the creation of a task to run idle functions */
    Task.enableIdleTask = false;
    
    /* 
     * Create a binary semaphore for the timer ISR to use to 
     * signal the pended task every 10 ticks 
     */
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    
    /*
     * Build a custom BIOS library.  The custom library will be smaller than the
     * pre-built "instrumented" (default) and "non-instrumented" libraries.
     *
     * The BIOS.logsEnabled parameter specifies whether the Logging is enabled
     * within BIOS for this custom build.  These logs are used by the RTA and
     * UIA analysis tools.
     *
     * The BIOS.assertsEnabled parameter specifies whether BIOS code will
     * include Assert() checks.  Setting this parameter to 'false' will generate
     * smaller and faster code, but having asserts enabled is recommended for
     * early development as the Assert() checks will catch lots of programming
     * errors (invalid parameters, etc.)
     */
    BIOS.libType = BIOS.LibType_Custom;
    BIOS.logsEnabled = true;
    BIOS.assertsEnabled = true;
    var hwi0Params = new Hwi.Params();
    hwi0Params.instance.name = "hwiPort2";
    hwi0Params.swiEnabled = false;
    hwi0Params.nestingEnabled = true;
    hwi0Params.threadTypeEnabled = false;
    Program.global.hwiPort2 = Hwi.create(42, "&fnHwiPort2", hwi0Params);
    var task0Params = new Task.Params();
    task0Params.instance.name = "tskRadioTransmit";
    task0Params.vitalTaskFlag = false;
    Program.global.tskRadioTransmit = Task.create("&fnTskRadioTransmit", task0Params);
    var task1Params = new Task.Params();
    task1Params.instance.name = "tskExecuteCommand";
    task1Params.vitalTaskFlag = false;
    Program.global.tskExecuteCommand = Task.create("&fnTskExecuteCommand", task1Params);
    var semaphore0Params = new Semaphore.Params();
    semaphore0Params.instance.name = "semProcessRadioMessage";
    semaphore0Params.mode = Semaphore.Mode_BINARY_PRIORITY;
    Program.global.semProcessRadioMessage = Semaphore.create(null, semaphore0Params);
    var task2Params = new Task.Params();
    task2Params.instance.name = "tskProcessRadioMessage";
    task2Params.vitalTaskFlag = false;
    Program.global.tskProcessRadioMessage = Task.create("&fnTskProcessRadioMessage", task2Params);
    var semaphore1Params = new Semaphore.Params();
    semaphore1Params.instance.name = "semExecuteCommand";
    semaphore1Params.mode = Semaphore.Mode_BINARY_PRIORITY;
    Program.global.semExecuteCommand = Semaphore.create(null, semaphore1Params);
    var task3Params = new Task.Params();
    task3Params.instance.name = "tskDisplayParameters";
    task3Params.vitalTaskFlag = false;
    task3Params.priority = 1;
    task3Params.stackSize = 512;
    Program.global.tskDisplayParameters = Task.create("&fnTskDisplayParameters", task3Params);
    var hwi2Params = new Hwi.Params();
    hwi2Params.instance.name = "hwiADC12";
    hwi2Params.swiEnabled = false;
    hwi2Params.taskEnabled = true;
    hwi2Params.threadTypeEnabled = false;
    hwi2Params.nestingEnabled = true;
    Program.global.hwiADC12 = Hwi.create(54, "&fnHwiADC12", hwi2Params);
    var task4Params = new Task.Params();
    task4Params.instance.name = "tskMockDrill";
    task4Params.vitalTaskFlag = false;
    task4Params.stackSize = 512;
    Program.global.tskMockDrill = Task.create("&fnTskMockDrill", task4Params);
    Clock.timerId = 2;
    ClockFreqs.SMCLK = 24969216;
    Boot.configureDCO = false;
    ClockFreqs.ACLK = 32768;
    BIOS.cpuFreq.lo = 24969216;
    var hwi2Params0 = new Hwi.Params();
    hwi2Params0.instance.name = "hwiUARTA1";
    hwi2Params0.swiEnabled = false;
    hwi2Params0.taskEnabled = true;
    hwi2Params0.threadTypeEnabled = false;
    hwi2Params0.nestingEnabled = true;
    Program.global.hwiUARTA1 = Hwi.create(46, "&fnHwiUARTA1", hwi2Params0);
    var clock0Params = new Clock.Params();
    clock0Params.instance.name = "clkReadSensors";
    clock0Params.period = 2;
    clock0Params.startFlag = true;
    Program.global.clkReadSensors = Clock.create("&fnClkReadSensors", 100, clock0Params);
    var clock1Params = new Clock.Params();
    clock1Params.instance.name = "clkSetAbsolutePosition";
    clock1Params.period = 2;
    Program.global.clkSetAbsolutePosition = Clock.create("&fnClkSetAbsolutePosition", 2, clock1Params);
    var hwi3Params = new Hwi.Params();
    hwi3Params.instance.name = "hwiPort1";
    hwi3Params.threadTypeEnabled = false;
    hwi3Params.swiEnabled = false;
    hwi3Params.taskEnabled = true;
    Program.global.hwiPort1 = Hwi.create(47, "&fnHwiPort1", hwi3Params);
    var semaphore2Params = new Semaphore.Params();
    semaphore2Params.instance.name = "semTransmitNow";
    semaphore2Params.mode = Semaphore.Mode_BINARY_PRIORITY;
    Program.global.semTransmitNow = Semaphore.create(null, semaphore2Params);
    Load.taskEnabled = false;
    LoggingSetup.sysbiosTaskLogging = true;
    LoggingSetup.sysbiosTaskLoggingRuntimeControl = false;
    LoggingSetup.mainLogging = false;
    LoggingSetup.mainLoggingRuntimeControl = false;
    LoggingSetup.loadLoggingRuntimeControl = false;
    LoggingSetup.sysbiosHwiLogging = true;
    Load.hwiEnabled = true;
    LoggingSetup.sysbiosLoggerSize = 3076;
    LoggingSetup.mainLoggerSize = 1024;
    LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_JTAGSTOPMODE;
    LoggingSetup.loadLoggerSize = 1024;
    Load.windowInMs = 1;
    

  • Mohammed,

    To determine the CPU load the Idle task must be enabled. Can you try enabling it?

    /* Inhibit the creation of a task to run idle functions */
    Task.enableIdleTask = true
  • I added the line at the end of the CFG file, but there was no effect. I still do not see CPU load and have not seen occurrence of any Hwi event. 

  • Mohammed,

    with all the Tasks in your system, are you sure you are even getting into the Idle loop? The CPU load is calculated as a percentage on how much time is spent in the Idle loop vs. some other context.

    I'd try remove some Tasks and slowly adding them into your system after you get a CPU load to show up. I'd also remove the "Load.windowInMs = 1;" from your config file.

    Have you taken a look at TI-RTOS's UART Logging example's .cfg file? I believe that example shows the overall CPU load.

  • There may be many tasks, but they are all "Sleeping" waiting on Semaphores. There is actually only 1 active task which I do see periodically as an event in the 'Live' window data. 

    I tried searching for the UART example but I was unable to find it through Google search. I am using SYS-BIOS only not TI-RTOS. If you could post a link I could check it up, however I have actually done everything. I am beginning to wonder if the UIA actually works properly with the MSP series.

  • Mohammed,

    I tweaked around with a TI-RTOS example to enable CPU load logging with UIA. I've attached a .cfg file that worked for me with my example. In my example, I had only one task going to sleep every 10ms.

    0167.uartlogging_msp430.cfg

    Here were a few things that I found I had to change to get the CPU load to show up in the LoggingSetup.

    • The Power module removed (disabled)
    • The Task module needs to have the Idle task enabled (default)
    • I used the following BIOS setup. Note that I have BIOS logs enabled.
    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    BIOS.libType = BIOS.LibType_Custom;
    BIOS.swiEnabled = false;
    BIOS.logsEnabled = true;
    BIOS.assertsEnabled = false;
    • I used the following LoggingSetup to show the CPU load. Note that I have loadLogging = true.
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    LoggingSetup.loadLogging = true;
    LoggingSetup.sysbiosTaskLogging = false;
    LoggingSetup.sysbiosTaskLoggingRuntimeControl = false;

    Note that a lot of these settings can be configured using the graphical LoggingSetup pages.

    I'd also suggest to check ROV's Load module and see that you are getting a decent CPU load there before you try displaying the CPU load values in the Live Logs or the CPU graph.