diff --git a/arduino-core/src/processing/app/debug/LegacyTargetPlatform.java b/arduino-core/src/processing/app/debug/LegacyTargetPlatform.java index 9dd5bd48e..036860832 100644 --- a/arduino-core/src/processing/app/debug/LegacyTargetPlatform.java +++ b/arduino-core/src/processing/app/debug/LegacyTargetPlatform.java @@ -70,8 +70,23 @@ public class LegacyTargetPlatform implements TargetPlatform { // Load boards try { - Map boardsPreferences = new PreferencesMap( - boardsFile).firstLevelMap(); + PreferencesMap bPrefs = new PreferencesMap( + boardsFile); + + // Allow overriding values in boards.txt. This allows changing + // boards.txt (e.g. to add user-specific items to a menu), without + // having to modify boards.txt (which, when running from git, + // prevents files being marked as changed). + File localboardsFile = new File(folder, "boards.local.txt"); + try { + if (localboardsFile.exists() && localboardsFile.canRead()) { + bPrefs.load(localboardsFile); + } + } catch (IOException e) { + throw new TargetPlatformException( + format(tr("Error loading {0}"), localboardsFile.getAbsolutePath()), e); + } + Map boardsPreferences = bPrefs.firstLevelMap(); // Create custom menus for this platform PreferencesMap menus = boardsPreferences.get("menu"); diff --git a/hardware/arduino/avr/cores/arduino/PluggableUSB.h b/hardware/arduino/avr/cores/arduino/PluggableUSB.h index 23013eb78..33108db91 100644 --- a/hardware/arduino/avr/cores/arduino/PluggableUSB.h +++ b/hardware/arduino/avr/cores/arduino/PluggableUSB.h @@ -50,8 +50,6 @@ int PUSB_GetDescriptor(int8_t t); bool PUSB_Setup(USBSetup& setup, u8 i); -void PUSB_Begin(); - #endif #endif