File tree 1 file changed +8
-2
lines changed
app/src/processing/app/debug
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -183,12 +183,18 @@ public boolean compile(Sketch sketch,
183
183
}
184
184
185
185
// 4. link it all together into the .elf file
186
-
186
+ // For atmega2560, need --relax linker option to link larger
187
+ // programs correctly.
188
+ String optRelax = "" ;
189
+ String atmega2560 = new String ("atmega2560" );
190
+ if ( atmega2560 .equals (boardPreferences .get ("build.mcu" )) ) {
191
+ optRelax = new String (",--relax" );
192
+ }
187
193
sketch .setCompilingProgress (60 );
188
194
List baseCommandLinker = new ArrayList (Arrays .asList (new String [] {
189
195
avrBasePath + "avr-gcc" ,
190
196
"-Os" ,
191
- "-Wl,--gc-sections" ,
197
+ "-Wl,--gc-sections" + optRelax ,
192
198
"-mmcu=" + boardPreferences .get ("build.mcu" ),
193
199
"-o" ,
194
200
buildPath + File .separator + primaryClassName + ".elf"
You can’t perform that action at this time.
0 commit comments