Are optimize flags possible

Please take a look at build_flags and build_unflags.

Build PIO project in verbose mode using $ pio run --verbose and check the current optimization level. Then add it to build_unflags and new optimization level to build_flags. For example, platformio.ini

[env:myenv]
platform = ...
board = ...
build_flags = -O2
build_unflags = -Os
1 Like