first of all: I’ve just installed platformio yesterday so being an absolute newbie. Please be patient
To keep track of source code location from installed/running programs as first action I always print the __FILE__
variable give me the location of the source. This works fine in plain Arduino programs, the whole path is printed. However with platformio all I get printeted is “main.cpp” not the whole path.
Standard Predefined Macros (The C Preprocessor) explains:
“FILE This macro expands to the name of the current input file, in the form of a C string constant. This is the path by which the preprocessor opened the file, not the short name specified in ‘#include’ or as the input file name argument. For example, “/usr/local/include/myheader.h” is a possible expansion of this macro.”
What is wrong with my code:
printf("\n\nCompiled \nfrom: %s \n on %s %s\n", __FILE__, __DATE__ , __TIME__);
I like to see the whole path printed as in plain Arduino.
Thank you