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.

CC DebugStartup Time?

I notice that that when I call the c lib function time() that the actual time is returned, even though the Spectrum Digital DSK 6455 we are using does not have a real-time clock.

Does CC somehow set the clock() when it starts debugging an app?

Another question would be, if we are not planning on having a RTC, how do I set the c lib time structures to get local time?

Are there any documents on this?

 

 

  • Douglas Corarito said:
    Does CC somehow set the clock() when it starts debugging an app?

    I suspect this is the case, CCS and the run time support library are not aware of any particular RTC hardware that you may or may not have on your target, so I cannot see any other way for it to have returned the current time. I suppose you could check this by changing the time on your PC and seeing if that is reflected in the target board.

    I suspect the time would not be correct anymore if the board was booted stand alone out of flash.

    Douglas Corarito said:
    Another question would be, if we are not planning on having a RTC, how do I set the c lib time structures to get local time?

    You would need some sort of timer to keep the time correct as that is not inherent in the device, so this is something that would have to be implemented on your custom board.

    Douglas Corarito said:
    Are there any documents on this?

    I don't recall seeing one, though I have not done much work with C6455 in some time.

  • When you call the function time(), and you are running under CCS, the time returned is fetched from Windows running on the PC.  If you run this same program in a context without CCS, the time() function silently fails.  The documentation does not mention this limitation of time().  I filed the entry SDSCM00035079 in our ClearQuest system.  Feel free to check on that entry here https://cqweb.ext.ti.com/cqweb/main?command=GenerateMainFrame&service=CQ&schema=SDo-Web&contextid=SDOWP&username=readonly&password=readonly .    

    Thanks and regards,

    -George