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.

Trying to get RTA working with MSP432P401 launchpad with Task example

Other Parts Discussed in Thread: SYSBIOS

Hello,

This is my setup:

Software:

- Latest code composer studio which is also updated

- TI RTOS "Task Mutex Example" example

Hardware:

MSP432P401R LaunchPad

What I'm trying to do is visualise the tasks changing via the RTOS analyzer tools.

In this case the Execution Analysis.

I did various searches on the internet and from what I could find it should work when enabled via the mutex.cfg -> Ti-RTOS->Products-> UIA -> LoggingSetup.

I have added loggingsetup to my configuration, added rtos execution analysis for task context  and Semaphores. Run-time control of event logging is also on.

Now I have saved the .cfg and rebuild the program successfully.  In the debug view I set a breakpoint in each one of the tasks and add the Execution Analysis to the debugging view. It does show up , but nothing ever is displayed in the graph. I can see the tasks change in the RTOS Object View (ROV) but nothing changes in the graph.

I have tried multiple settings and also followed the tutorial in the documentation but ... I must be doing something wrong.

I have tested it with the "Stairstep JTAG StopMode" example and there is seems to work for whatever reason. I have copied the .cfg code and pasted it in the Task example but still no luck.

It would be wonderful if somebody could help me fix this issue. I have used RTOS before on other platforms but this is the first time with TI.

I'm really hoping to get this tool working.

Regards,

Spikee

  • Can you remove the following lines from the .cfg and see if the helps?

    /*
    * Create and install logger for the whole system
    */
    var loggerBufParams = new LoggerBuf.Params();
    loggerBufParams.numEntries = 32;
    var logger0 = LoggerBuf.create(loggerBufParams);
    Defaults.common$.logger = logger0;
    Main.common$.diags_INFO = Diags.ALWAYS_ON;

    The above lines plug in a logger that is not compatible with System Analyzer. If you remove these lines, LoggingSetup will default everything so stopmode works.

    Did you change anything else in the .cfg (other than adding in LoggingSetup)? If you did, can you attach the .cfg file if the above step does not work.

    Todd
  • Sadly this did not work. I have not changed anything else in the cfg.
    Here is my CFG file: http://pastebin.com/NAytxaWQ

    My whole project:
    mega.nz

    Hope to get it working.
    Thanks for the answer.
  • These are restricted sites for me inside our network. Can you to attach the zipped project to this site. You should do a clean and delete the debug/release/src directories to make the zip smaller.

  • Hello,

    I have added the zip:
    1425.task_MSP432P401R.zip

    Thank you

  • Everything looks ok. In ROV, do you see LoggerStopmode or a different logger? There should be three different instances (CPU, SYSBIOS and main). Just to confirm, you see records here...correct? Do you see anything in the raw logs in System Analyzer? It should pretty much mimic ROV.
  • The live logger thing is empty , ROV shows the correct info. It is indeed in LoggerStopmode  (in config).

    Where can I find this? " There should be three different instances (CPU, SYSBIOS and main"

    config 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 LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
    var Main = xdc.useModule('xdc.runtime.Main');
    var SysMin = xdc.useModule('xdc.runtime.SysMin');
    var System = xdc.useModule('xdc.runtime.System');
    var Text = xdc.useModule('xdc.runtime.Text');
    
    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    
    /*
     * 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;
     */
    
    /*
     * 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;
     */
    
    /*
     * The BIOS module will create the default heap for the system.
     * Specify the size of this default heap.
     */
    BIOS.heapSize = 0x2000;
    
    /*
     * Build a custom SYS/BIOS library from sources.
     */
    BIOS.libType = BIOS.LibType_Custom;
    
    /* System stack size (used by ISRs and Swis) */
    Program.stack = 0x400;
    
    /* Circular buffer size for System_printf() */
    SysMin.bufSize = 0x200;
    
    /*
     * Create and install logger for the whole system
    
    var loggerBufParams = new LoggerBuf.Params();
    loggerBufParams.numEntries = 32;
    var logger0 = LoggerBuf.create(loggerBufParams);
    Defaults.common$.logger = logger0;
    Main.common$.diags_INFO = Diags.ALWAYS_ON;
     */
    System.SupportProxy = SysMin;
    LoggingSetup.sysbiosSemaphoreLogging = true;
    LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE;
    

    Pictures:

    http://i.imgur.com/HF64A3a.png

    http://i.imgur.com/cnYw123.png

    http://i.imgur.com/3x4qigQ.png

  • When doing the task load graph the live session log shows like 50 messages while it only shows one in when in execution analysis. Note it shows Inadequate when load analysis is used and good when execution analysis is chosen.

    See:

    http://i.imgur.com/eJmjGmx.png

    http://i.imgur.com/0BfmIRM.png

    There is something between those two that messes data that is sent via the live session.

    Because of this the graph will also not work. Not we need to find out why it happens. 

    This seems to be some software bug

  • By disconnecting the debug target , connecting to it I can get it to work. But I can not use breakpoints :"CORTEX_M4_0: AutoRun: Target not run as breakpoint could not be set: Error enabling this function"

    http://i.imgur.com/ycyP0mA.png

    http://i.imgur.com/TLmXXUA.png

    This is getting really weird

  • I was really hoping to get this to work. I wanted to use this microcontroller in a new product I'm designing.

    But if this does not work out than I'll have to look at some other vendors who got tools to do this.

  • Sorry, I was out of the office and missed this.

    From the snapshots, you still have LoggerBuf present. I see it in the ROV view.

    If you stop in the first task that runs, there will be very minimal information. Have you tried letting it run longer to get more information?
  • I have not tried to let it run longer than 10 cycles.

    How many cycles would be enough for the information to be gathered?

    Must I change something in the configuration file?

    Thank you for response

  • I did the following.

    1. Imported the Task Mutex example.

    2. I removed all the LoggerBuf lines from the .cfg. (These are the lines I removed).

    var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');

    var loggerBufParams = new LoggerBuf.Params();

    loggerBufParams.numEntries = 32;

    var logger0 = LoggerBuf.create(loggerBufParams);

    Defaults.common$.logger = logger0;

    Main.common$.diags_INFO = Diags.ALWAYS_ON;

    3. Added the following line into the .cfg

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

    4. Built and loaded the .out file

    5. Ran the program to completion (no breakpoints...the program terminates when task2 calls BIOS_exit) .

    6. Opened ROV and I saw records 18-48 in LoggerStopMode->Records->SYSBIOS System Logger. The default logger size only holds so many records. Once that is reached, it overwrites the old records. You can increase the size in the LoggingSetup module.

    7. Opened Execution Graph and saw the following

    Can you do those exact steps and see what happens.

    Todd

  • I got it to work using your help. 

    What I discovered is that you first need to let it run and open the Execution graph when it is done. It does not seem to auto update when just looking at the empty execution graph and letting it run and stop. Flipping between the taps seems to also help.

    Thank you

  • The logger is a stop-mode logger. System Analyzer reads the target when it is stopped to get the log records. It does not update while the target is running. You need to send the log records out a UART or USB for runtime updates. There are examples of this in the Resource Explorer (Drivers->UART: UART Logging and UART Console).

  • yeah that seems logical. Thanks for the help.