Generation of COPILE_TIME as a type of time_t

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Generation of COPILE_TIME as a type of time_t

    Hi!

    I followed advice described at stackoverflow
    but I could not get the project options correct to run either a pre-compile command

    Source Code

    1. echo "#define COMPILE_TIME $(date '+%s')" > $(ProjectDir)/timestamp.h


    or supply any additional arguments to the compiler like

    Source Code

    1. -DCOMPILE_TIME=`date '+%s'`


    What I am missing or not noticing?
  • Hi,

    data is an external tool, which is most probably only available on Linux.

    Best regards
    Johannes
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.