mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-02 13:24:12 +01:00
Compiler: don't merge if bootloader file is specified but missing. Print a warning instead. Fixes #3394
This commit is contained in:
parent
8e76fb87dc
commit
978c8fc682
@ -1198,15 +1198,19 @@ public class Compiler implements MessageConsumer {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
File mergedSketch = new File(buildPath, className + ".with_bootloader.hex");
|
|
||||||
FileUtils.copyFile(sketch, mergedSketch);
|
|
||||||
|
|
||||||
String bootloaderNoBlink = prefs.get("bootloader.noblink");
|
String bootloaderNoBlink = prefs.get("bootloader.noblink");
|
||||||
if (bootloaderNoBlink == null) {
|
if (bootloaderNoBlink == null) {
|
||||||
bootloaderNoBlink = prefs.get("bootloader.file");
|
bootloaderNoBlink = prefs.get("bootloader.file");
|
||||||
}
|
}
|
||||||
|
|
||||||
File bootloader = new File(new File(prefs.get("build.platform.path"), "bootloaders"), bootloaderNoBlink);
|
File bootloader = new File(new File(prefs.get("build.platform.path"), "bootloaders"), bootloaderNoBlink);
|
||||||
|
if (!bootloader.exists()) {
|
||||||
|
System.err.println(I18n.format(_("Bootloader file specified but missing: {0}"), bootloader));
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
File mergedSketch = new File(buildPath, className + ".with_bootloader.hex");
|
||||||
|
FileUtils.copyFile(sketch, mergedSketch);
|
||||||
|
|
||||||
new MergeSketchWithBooloader().merge(mergedSketch, bootloader);
|
new MergeSketchWithBooloader().merge(mergedSketch, bootloader);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user