Monday, November 3, 2014

Time Stamp

for keil compilar environment, they had a defination for time stamp, therefore we could use that to be a release note for product purpose.

how to use?

printf("%s %s",__DATE__,__TIME__);

or you could assign memory for them.

U8 KC_DATA Datestring[sizeof(__DATE__)];
U8 KC_DATA Timestring[sizeof(__TIME__)];


memcpy(Datestring, &__DATE__, sizeof(__DATE__));
memcpy(Timestring, &__TIME__, sizeof(__TIME__));

 

Reference

[1] http://www.keil.com/forum/2789/display-time-and-date/

No comments:

Post a Comment

Register Transfer Level Design with Verilog (1) [ebook]

設計程式之所以有趣不外乎是它的千變萬化,同樣的結果卻有不同的寫法。 但這些不同寫法當中也並沒有分誰對誰錯,也沒有制定標準來規範何事該用何解。 這也就是我們設計者的珍貴!! [1] Primitive Instantiations 在Verilog中最基本的邏輯...