I'm running on Ubuntu 23.10 and Arduino IDE version 2.3.2.
I am trying to get the compiler to output a list of all of the macros that are defined in a compile.
I have the verbose output turned on, and I have a platform.local.txt file with the -dM & -E flags in it:
compiler.cpp.extra_flags=-dM -E
They are showing up in the verbose compiler output as part of the compiler command line.
But, the stdout from the compiler that would have the defined symbols in it is not being shown anywhere. I've looked for a file in the directory that the project is in, and also the /tmp/... directory that the intermediate files are kept. Nothing found.
Is there someone here that can help me figure out where the stdout goes, or what to do to enable showing it?
The gcc command line that the IDE builds includes a "-o someObscureTempFile.ino.cpp.o", so your preprocessor output is ending up in there.
When I need -E output, I normally cut&paste the compile line from the IDE's "verbose" compile output into an xterm and edit it manually (change -c to -E, change -o xxxx to -o /tmp/foo.E, etc.)
Thanks, that solution is what I used to get it. In my case it's -o /dev/null. Somewhat less than useful.
I have a somewhat complex project and I had to add a number of -I path's to account for extra libraries, but I was able to get the output that I wanted.