Browse Source

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>
Victor Oliveira 4 years ago
parent
commit
1a04c8c7bb
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      platformio.ini

+ 1
- 1
platformio.ini View File

203
   pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
203
   pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
204
   pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
204
   pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
205
   post:buildroot/share/PlatformIO/scripts/common-dependencies-post.py
205
   post:buildroot/share/PlatformIO/scripts/common-dependencies-post.py
206
-build_flags        = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-all-constants
206
+build_flags        = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-constants
207
 lib_deps           =
207
 lib_deps           =
208
 
208
 
209
 #
209
 #

Loading…
Cancel
Save