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.

LOG_printf() with RTDX

Other Parts Discussed in Thread: OMAP-L138

Hi,

 

I'm trying to display logs generated by LOG_printf() in real-time, since

SYS_printf() is too computationally intensive. From what I've read I can

achieve this using RTA (for the logs) and RTDX (for transferring the

logs from the target to CCS).

 

Can you please advise me on the necessary steps to perform this

configuration in both the *.tcf file and the code itself (if applicable).

I'm pretty sure RTA is correctly configured, since I get the logs once

I've halted the target.

 

I'm using CCS 4.2 with DSP/BIOS 5.41 on the OMAP-L138

 

Please do not just refer me to the user manuals, since I find them

unclear on this specific subject.

 

Thanks in advance!

 

Regards

  Reinier

 

 

  • Since you have successfully configured your system to support logging in stop mode, I think you're just two .tcf lines away from success.

    Try adding these two lines to your tcf file and see if RTDX works as expected:

    bios.enableRealTimeAnalysis(prog);
    bios.enableRtdx(prog);

    Alan

  • Hi Alan,

     

    I actually already have those lines in my TCF file. I noticed that I receive

    the logs in real-time the first time around, but after that I only receive the

    logs once I've halted the target. My TCF script is as follows:

     

    /*
     *  ======== hello.tcf ========
     *  Configuration script used to generate the example's configuration files
     */

    utils.loadPlatform("ti.platforms.evmOMAPL138");
    /*
     * Enable common BIOS features used by all examples
     */
    bios.enableRealTimeAnalysis(prog);
    bios.enableMemoryHeaps(prog);
    bios.enableRtdx(prog);   
    bios.enableTskManager(prog);

    /*
     * Enable heaps in IRAM and define label SEG0 for heap usage.
     */
     
     print("Hello!");
     
     
    bios.IRAM.createHeap      = true;
    bios.IRAM.enableHeapLabel = true;
    bios.IRAM["heapLabel"]    = prog.extern("SEG0");
    bios.IRAM.heapSize        = 0x2000;
    bios.MEM.BIOSOBJSEG = prog.get("IRAM");
    bios.MEM.MALLOCSEG = prog.get("IRAM");

    /*
     *  The following statements will enable the MAR bit for MAR 128.
     *  (MAR 192 to MAR 223 are enabled by default).
     *  This will make the memory ranges (0x8000 0000 - 0x8001 FFFF) and
     *  (0xC000 0000 - 0xDFFF FFFF) cacheable.
     */
    bios.GBL.C64PLUSCONFIGURE = 1;
    bios.GBL.C64PLUSMAR128to159 = 0x00000001;

    /*
     *  When using the ARM with DSP, the ARM will share Timer 1 with the DSP.
     *  The ARM needs to enable power to Timer 1, program the timer for "32-bit unchainded" mode
     *  and take it out of reset.  The BIOS CLK should be driven with Timer 1 and not reset
     *  the timer.
     *
     *  In most production ARM+DSP systems we recommend removing these 2
     *  lines and sharing Timer1 with the Arm.  This will free up Timer0 for use by the
     *  application.
     *
     *  The workaround below is used to make the DSP-side applications work "out of the box"
     *  without any need for coordination with the ARM OS.
     */

    bios.CLK.TIMERSELECT = "Timer 0";      /* Select Timer 0 to drive BIOS CLK */
    bios.CLK.RESETTIMER = true;          /* Take the selected timer our of reset */

    /*
     * Create and initialize a LOG object
     */

    var trace;
    trace         = bios.LOG.create("trace");
    trace.bufLen  = 1024;
    trace.logType = "circular";

    /*
     * Set the buffer length of LOG_system buffer
     */
    bios.LOG_system.bufLen = 512;


    // !GRAPHICAL_CONFIG_TOOL_SCRIPT_INSERT_POINT!

    if (config.hasReportedError == false) {
        prog.gen();
    }

     

    Do you perhaps have an explanation for this behaviour?

     

    Regards

      Reinier

     

     

     

  • Reiner,

    What do you mean by "the first time around"?

    When does it stop working?

    Alan

  • Alan,

     

    When I start CCS 4.2, compile the project and then debug it, the results from LOG_printf() are received in real-time.

    However, for any further debug sessions after that, the results from LOG_printf() are only received once the target

    has been halted. If I restart CCS 4.2 again, the LOG_printf() for the first debug session works in real-time and from

    thereon only once the target has been halted.

     

    Any ideas?

     

    Regards

      Reinier

  • Check this link:

    http://processors.wiki.ti.com/index.php/BIOS_5_Real-Time_Analysis_%28RTA%29_in_CCSv4.   There's a troubleshooting section that might help.

    RTDX fails intermittently

    Unfortunately, there are known issues with RTDX on various combinations of targets and emulators. If RTDX stops working, you can try toggling the 'Stream RTA data' button towards the top right of the view. This re-initializes RTA and may resolve the issue. If not, you will likely have to terminate and relaunch your debug session (just the debug session, not the entire CCS IDE) to resolve it.


    RTDX is no longer being actively supported, so hopefully the relaunch debug session workaround will keep you going.

    http://processors.wiki.ti.com/index.php/Real_Time_Data_eXchange_%28RTDX%29

    Regards,
    -Karl-