Hi,
is it possible to show / list all used pre processor definitions used during a compilation?
Background: I'm writing a sketch for ESP32 and I like to have a check for the IDF version, also for the selected hardware. So using something like #ifdef ARDUINO_ARCH_ESP32
for the Arduino IDE version and and the Espressif IDF version is needed.
A list with all used definitions might also be helpful for other topics.
You can add these #ifdef to your code and eventually generate warnings showing the actual values.
Listing the used preprocessor directives will require to dig into the lexer. Some time ago I wrote a parser that could be used for that purpose, but I doubt that a compiler will hold such information.
Thank you, but I'm looking for the used definitions in the current project.
I found one which is usefull for my current ESP32 project:
IDF_VER
This is set to the used Espressif IDF version installed in the Arduino IDE. Since I try something with Bluetooth I need to make sure at least 4.4.1 because there should a bug be fixed.
So now I can stop if the version is lower than 4.4.1 (or in a simple way I just print out the version to see I'm using a newer one... )
Hi, thank you, this is the option I need.
The only hard thing is currently to get the huge command into a command line, maybe I can test this on a Linux installation, Windows is not able to handle this from my current project...