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 <[email protected]>
  • Loading branch information
rhapsodyv authored and thinkyhead committed Apr 29, 2021
1 parent 39cc34c commit c11035f
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 c11035f

Please sign in to comment.