Skip to content

Commit

Permalink
Avoid invalid memory optimizations (MarlinFirmware#20389)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rhapsodyv authored and Kannix2005 committed Dec 7, 2020
1 parent 5daf273 commit a931f03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 =

#
Expand Down

0 comments on commit a931f03

Please sign in to comment.