@@ -401,11 +401,11 @@ public boolean compile(boolean _verbose) throws RunnerException, PreferencesMapE
401
401
402
402
// 5. extract EEPROM data (from EEMEM directive) to .eep file.
403
403
progressListener .progress (70 );
404
- compileEep ( );
404
+ runRecipe ( "recipe.objcopy.eep.pattern" );
405
405
406
406
// 6. build the .hex file
407
407
progressListener .progress (80 );
408
- compileHex ( );
408
+ runRecipe ( "recipe.objcopy.hex.pattern" );
409
409
410
410
progressListener .progress (90 );
411
411
return true ;
@@ -1069,28 +1069,12 @@ void compileLink()
1069
1069
execAsynchronously (cmdArray );
1070
1070
}
1071
1071
1072
- // 5. extract EEPROM data (from EEMEM directive) to .eep file.
1073
- void compileEep () throws RunnerException , PreferencesMapException {
1072
+ void runRecipe (String recipe ) throws RunnerException , PreferencesMapException {
1074
1073
PreferencesMap dict = new PreferencesMap (prefs );
1075
1074
dict .put ("ide_version" , "" + BaseNoGui .REVISION );
1076
1075
1077
1076
String [] cmdArray ;
1078
- String cmd = prefs .getOrExcept ("recipe.objcopy.eep.pattern" );
1079
- try {
1080
- cmdArray = StringReplacer .formatAndSplit (cmd , dict , true );
1081
- } catch (Exception e ) {
1082
- throw new RunnerException (e );
1083
- }
1084
- execAsynchronously (cmdArray );
1085
- }
1086
-
1087
- // 6. build the .hex file
1088
- void compileHex () throws RunnerException , PreferencesMapException {
1089
- PreferencesMap dict = new PreferencesMap (prefs );
1090
- dict .put ("ide_version" , "" + BaseNoGui .REVISION );
1091
-
1092
- String [] cmdArray ;
1093
- String cmd = prefs .getOrExcept ("recipe.objcopy.hex.pattern" );
1077
+ String cmd = prefs .getOrExcept (recipe );
1094
1078
try {
1095
1079
cmdArray = StringReplacer .formatAndSplit (cmd , dict , true );
1096
1080
} catch (Exception e ) {
0 commit comments