Optimize (-O -O1 -O2...) with PlatformIO #1721
Answered
by
maxgerhardt
LazaroFilm
asked this question in
Q&A
-
I can't find the optimization option in PlatformIO. I see it in Arduino IDE's menu but I can't find where it would be in VS Code's PlatformIO... |
Beta Was this translation helpful? Give feedback.
Answered by
maxgerhardt
Sep 23, 2023
Replies: 1 comment
-
PlatformIO applies a default optimization of ; throw out default optimize for size
build_unflags = -Os
; let's make this slow on purpose because why not ^_^
build_flags = -O0 You can always verify that your wanted flags are applied by looking at the full compiler invocations as shown in project tasks -> Advanced -> Verbose Build. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
LazaroFilm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PlatformIO applies a default optimization of
-Os
. As documented in build_flags and build_unflags, you can throw the default one out and insert your own in theplatformio.ini
like so:You can always verify that your wanted flags are applied by looking at the full compiler invocations as shown in project tasks -> Advanced -> Verbose Build.