Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years ago.
Compilier time in the program
Is there a macro or pragma in the online compiler to store the compiler date and time in the program so that I can call it when running?
1 Answer
7 years ago.
Serial pc(USBTX, USBRX); pc.printf("Compile date : %s\n", __DATE__); pc.printf("Compile time : %s\n", __TIME__);
Thanks, that is exactly what I was looking for. But where is this stuff documented. I would rather find it out by myself then asking around.
Uwe
posted by 21 Mar 2017This is pre-define macro feature in compiler, not mbed itself. Most of embedded toolchain (ARMCC, IAR, GNU) support these macros.
https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
posted by 21 Mar 2017