How to list defined symbols?

PlatformIO Build System is based on SCons tool. SCons doesn’t provide this information because it is buid system (not compiler). Nevertheless, you can resolve it with extra_script.

The full process should look like:

  1. Create extra script for PlatformIO Build System
  2. Get a list with build files
  3. Run gcc -fpreprocessed -E -dM on each file
  4. Parse defines

Here is explanation how to list all files that are going to be built https://bitbucket.org/scons/scons/wiki/FindTargetSources
This approach requires Python and SCons skills. I even don’t know how to explain in a few words how to resolve it.

SCons is build tool/framework (Python-based alternative to make/cmake). We created own cross-platform super-fast Build System with automatic Library Dependecy Finder for development platforms . Here is source code and development platforms.