From e127659bc5c6ce8b48286aceb640f293588bf3d0 Mon Sep 17 00:00:00 2001 From: gohai Date: Thu, 14 Apr 2016 14:38:36 +0200 Subject: [PATCH] Ignore memory options when exporting for ARM --- java/src/processing/mode/java/JavaBuild.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/src/processing/mode/java/JavaBuild.java b/java/src/processing/mode/java/JavaBuild.java index 829ea2903..3ba7003dc 100644 --- a/java/src/processing/mode/java/JavaBuild.java +++ b/java/src/processing/mode/java/JavaBuild.java @@ -1123,7 +1123,11 @@ public class JavaBuild { /// figure out run options for the VM List runOptions = new ArrayList(); - if (Preferences.getBoolean("run.options.memory")) { + + // set memory options, except for ARM where we're more memory-constrained compared + // to the machine the user might be building the sketch on + if (Preferences.getBoolean("run.options.memory") && + !exportVariant.equals("armv6hf")) { runOptions.add("-Xms" + Preferences.get("run.options.memory.initial") + "m"); runOptions.add("-Xmx" + Preferences.get("run.options.memory.maximum") + "m"); }