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() misses the first log

Other Parts Discussed in Thread: TEST2, OMAP-L137

I am trying to get started with DSP/BIOS. I am using CCSv4 and following sample projects. Firstly, I tried simple hello word project which simply calls LOG_printf() only:

LOG_printf(&trace,"Hello Word");

However, I couldn't see "Hello Word" in both Printf Logs and Raw Logs. Then, I switched to task example. In that example there are 3 running tasks. Each task runs a loop and there is only a LOG_printf() statement in loop. In total, log_printf() is called 15 times. However, I observed only 14 printf logs. Then, I returned to hello world project and add few LOG_printf() statements.

LOG_printf(&trace,"Hello Word");LOG_printf(&trace,"test1");LOG_printf(&trace,"test2");LOG_printf(&trace,"test3");

Then, I got the "test1","test2","test3" logs. It seems that first call of LOG_printf() is problematic or do i miss something?

Thanks!

  • Alper Yazar,
    can you try running the hello world project and try stepping into main() and then stepping over LOG_printf statements? How does Printf_Log (or Raw_Log) changes after stepping over LOG_printf(&trace,"Hello Word"); and then what happens after stepping over LOG_printf(&trace,"test1")?

    Which version of DSP/BIOS are you using?

  • Hi Alper Yazar,

    Can you please tell me which hardware platform you are using?

    Also, which version of BIOS and CCSv4 you are using?

    Thanks,

    Steve

  • Thanks for quick replies.

    I used following code for test:

    Void main(){

    LOG_printf(&trace,"hello1");

    LOG_printf(&trace,"hello2");

    }

    When I stepped over first LOG_printf(), I observed "hello1" log at Printf_Log. Similarly, I observed "hello2" after stepping over second LOG_printf() statement. I couldn't see any difference between two step (time delay etc.). However, when I run the code, only "hello2" was logged as mentioned previously.

    I am using,

    DSP/BIOS: 5.41.10.36

    CCS: 4.2.4.00033

    and Spectrum Digital OMAP-L137 EVM board.

    Thanks

  • Hi Alper Yazar,

    I was able to reproduce your problem.

    Are you using RTDX?  Can you try building/running the app in stop mode (with RTDX disabled)?

    Try adding the following line in bold towards the end of the code in your *.tcf file:

    ...

    bios.disableRtdx(prog)

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

    This will disable RTDX.  I was able to see all LOG_printf strings once I did this.

    Note that you will have to halt the target in order for the LOG_printf statements to be displayed in the RTA window.

    Steve

  • Hi Steven Connell,

    Yes, I am using RTDX. When I disabled it, I catched all logs after halt.

    However, disabling RTDX will cause no data transfer during run, right? For example, if i run my code 30 minutes, I will able to analyze logs occured at first seconds 30 minutes delayed. I prefer to loss first printf_LOG rather than disabling RTDX.

    Thanks

    Alper

  • Hi Alper,

    Alper Yazar said:
    However, disabling RTDX will cause no data transfer during run, right?

    Data won't appear live during the run, however it will appear once the target is halted.

    Alper Yazar said:
    For example, if i run my code 30 minutes, I will able to analyze logs occured at first seconds 30 minutes delayed

    Just a warning to ensure that you have sufficient space in your LOG buffers and also check circular mode.  Once the buffer has filled, LOG data will start overwriting the beginning of the buffer in circular mode.

    Alper Yazar said:
    I prefer to loss first printf_LOG rather than disabling RTDX.

    You shouldn't lose any data unless your LOG buffer sizes are insufficient or the LOG buffer wraps as mentioned above.  Only difference should be "halt mode" vs. "live mode" to view the data.

    Steve

  • Hi Steven Connell,

    I understand your point. As you stated, target should be halted to get log data. In some cases, I may want to see LOG immediately (Of course, transfer happens if BIOS is able to run IDL). When I disable the RTDX, I can't get logs until halt.

    First LOG_printf() problem can be solved by inserting a dummy printf in main() like LOG_printf(" ").

    Thanks again.

    Alper