@@ -405,26 +405,44 @@ public boolean compile(boolean _verbose, boolean _save) throws RunnerException,
405
405
System .err .println ();
406
406
}
407
407
}
408
-
408
+
409
+ runActions ("hooks.sketch.prebuild" , prefs );
410
+
409
411
// 1. compile the sketch (already in the buildPath)
410
412
progressListener .progress (20 );
411
413
compileSketch (includeFolders );
412
414
sketchIsCompiled = true ;
413
415
416
+ runActions ("hooks.sketch.postbuild" , prefs );
417
+
418
+ runActions ("hooks.libraries.prebuild" , prefs );
419
+
414
420
// 2. compile the libraries, outputting .o files to: <buildPath>/<library>/
415
421
// Doesn't really use configPreferences
416
422
progressListener .progress (30 );
417
423
compileLibraries (includeFolders );
418
424
425
+ runActions ("hooks.libraries.postbuild" , prefs );
426
+
427
+ runActions ("hooks.core.prebuild" , prefs );
428
+
419
429
// 3. compile the core, outputting .o files to <buildPath> and then
420
430
// collecting them into the core.a library file.
421
431
progressListener .progress (40 );
422
432
compileCore ();
423
433
434
+ runActions ("hooks.core.postbuild" , prefs );
435
+
436
+ runActions ("hooks.linking.prelink" , prefs );
437
+
424
438
// 4. link it all together into the .elf file
425
439
progressListener .progress (50 );
426
440
compileLink ();
427
441
442
+ runActions ("hooks.linking.postlink" , prefs );
443
+
444
+ runActions ("hooks.objcopy.preobjcopy" , prefs );
445
+
428
446
// 5. run objcopy to generate output files
429
447
progressListener .progress (60 );
430
448
List <String > objcopyPatterns = new ArrayList <String >();
@@ -437,10 +455,16 @@ public boolean compile(boolean _verbose, boolean _save) throws RunnerException,
437
455
runRecipe (recipe );
438
456
}
439
457
458
+ runActions ("hooks.objcopy.postobjcopy" , prefs );
459
+
440
460
// 7. save the hex file
441
461
if (saveHex ) {
462
+ runActions ("hooks.savehex.presavehex" , prefs );
463
+
442
464
progressListener .progress (80 );
443
465
saveHex ();
466
+
467
+ runActions ("hooks.savehex.postsavehex" , prefs );
444
468
}
445
469
446
470
progressListener .progress (90 );
0 commit comments