How to list all build flags from esp32 arduino framework?

For example, I know several build options for esp32-arduino in PlatformIO:

build_flags = -Os

What are the others?

I tried How to print all preprocessor flags in PlatformIO - TechOverflow but it seems to print sdkcondig defines which are fixed in arduino framework.

For native-USB capable ESP32(S3, S2, C3) there are also flags like

I’m not aware of a direct documentation of all build flags on Espressif’s side and beyond what PlatformIO documents, but technically all these answers lie in the platform.txt, board.txt and Arduino-ESP32 source code.

1 Like

Yeah, there are a lot of unsorted menu definitions. But thanks for the link. Indeed, that’s a purely arduino-esp32 matter. For some reasons, I thought they are defined on the PlatformIO side, because I’ve never seen these Arduino ESP32 build flag options elsewhere save for on PlatformIO resources. Now it makes sense.