From 26ff527ad295b105f2ad3e1ac5232f173e677d2c Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Thu, 24 Oct 2013 15:26:31 +0200 Subject: [PATCH] It's now possible to specify additional custom board parameters when running the IDE from the command line Eg: --board arduino:avr:pro:cpu=8MHzatmega168,other=value Closes #1353 --- app/src/processing/app/Base.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 627ac7a76..5ca58060b 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -1473,9 +1473,18 @@ public class Base { String[] split = selectBoard.split(":"); Preferences.set("target_package", split[0]); Preferences.set("target_platform", split[1]); - Preferences.set("board", split[2]); + String boardId = split[2]; + Preferences.set("board", boardId); - filterVisibilityOfSubsequentBoardMenus(split[2], 1); + if (split.length > 3) { + String[] customsParts = split[3].split(","); + for (String customParts : customsParts) { + String[] keyValue = customParts.split("="); + Preferences.set("custom_" + keyValue[0].trim(), boardId + "_" + keyValue[1].trim()); + } + } + + filterVisibilityOfSubsequentBoardMenus(boardId, 1); onBoardOrPortChange(); Sketch.buildSettingChanged();