Avoid invalid memory optimizations (#20389)

When building for AVR, merge-all-constants can incorrectly combine constants stored in flash with constants stored in RAM. These have different access requirements, leading to undefined behavior during execution.
Co-authored-by: ellensp <ellensp@hotmail.com>
2.0.x
Victor Oliveira 4 years ago committed by Scott Lahteine
parent 3a73f04fd3
commit 72eda1d3ae

@ -203,7 +203,7 @@ extra_scripts =
pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
post:buildroot/share/PlatformIO/scripts/common-dependencies-post.py
build_flags = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-all-constants
build_flags = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-constants
lib_deps =
#

Loading…
Cancel
Save