mirror of
https://github.com/arduino/Arduino.git
synced 2025-04-06 21:57:57 +02:00
Fixed eclipse project files
This commit is contained in:
parent
47e8a813c8
commit
d2734fa8e8
@ -1,9 +1,9 @@
|
|||||||
#Wed Jun 04 15:47:46 EDT 2008
|
#Wed Jan 11 13:49:57 CET 2012
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
@ -63,7 +63,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di
|
|||||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||||
org.eclipse.jdt.core.compiler.source=1.5
|
org.eclipse.jdt.core.compiler.source=1.6
|
||||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||||
|
@ -1,77 +1,67 @@
|
|||||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Sizer - computes the size of a .hex file
|
Sizer - computes the size of a .hex file
|
||||||
Part of the Arduino project - http://www.arduino.cc/
|
Part of the Arduino project - http://www.arduino.cc/
|
||||||
|
|
||||||
Copyright (c) 2006 David A. Mellis
|
Copyright (c) 2006 David A. Mellis
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
$Id$
|
$Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package processing.app.debug;
|
package processing.app.debug;
|
||||||
|
|
||||||
import java.io.File;
|
import processing.app.Base;
|
||||||
import java.text.MessageFormat;
|
|
||||||
import java.util.Map;
|
import java.io.*;
|
||||||
import java.util.NoSuchElementException;
|
import java.util.*;
|
||||||
import java.util.StringTokenizer;
|
|
||||||
|
|
||||||
public class Sizer implements MessageConsumer {
|
public class Sizer implements MessageConsumer {
|
||||||
private String buildPath, sketchName;
|
private String buildPath, sketchName;
|
||||||
|
|
||||||
private String firstLine;
|
private String firstLine;
|
||||||
|
|
||||||
private long size;
|
private long size;
|
||||||
|
|
||||||
private RunnerException exception;
|
private RunnerException exception;
|
||||||
|
|
||||||
private Map<String, String> prefs;
|
public Sizer(String buildPath, String sketchName) {
|
||||||
|
|
||||||
public Sizer(String buildPath, String sketchName,
|
|
||||||
Map<String, String> prefs) {
|
|
||||||
this.buildPath = buildPath;
|
this.buildPath = buildPath;
|
||||||
this.sketchName = sketchName;
|
this.sketchName = sketchName;
|
||||||
this.prefs = prefs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public long computeSize() throws RunnerException {
|
public long computeSize() throws RunnerException {
|
||||||
String args[] = new String[3];
|
String avrBasePath = Base.getAvrBasePath();
|
||||||
args[0] = prefs.get("compiler.path");
|
String commandSize[] = new String[] {
|
||||||
args[1] = prefs.get("compiler.size.cmd");
|
avrBasePath + "avr-size",
|
||||||
args[2] = buildPath + File.separator + sketchName;
|
" "
|
||||||
|
};
|
||||||
String recipe = prefs.get("recipe.size.pattern");
|
|
||||||
MessageFormat compileFormat = new MessageFormat(recipe);
|
commandSize[1] = buildPath + File.separator + sketchName + ".hex";
|
||||||
String command = compileFormat.format(args);
|
|
||||||
String[] commandArray = command.split("\\|");
|
|
||||||
|
|
||||||
int r = 0;
|
int r = 0;
|
||||||
try {
|
try {
|
||||||
exception = null;
|
exception = null;
|
||||||
size = -1;
|
size = -1;
|
||||||
firstLine = null;
|
firstLine = null;
|
||||||
Process process = Runtime.getRuntime().exec(commandArray);
|
Process process = Runtime.getRuntime().exec(commandSize);
|
||||||
MessageSiphon in = new MessageSiphon(process.getInputStream(), this);
|
MessageSiphon in = new MessageSiphon(process.getInputStream(), this);
|
||||||
MessageSiphon err = new MessageSiphon(process.getErrorStream(), this);
|
MessageSiphon err = new MessageSiphon(process.getErrorStream(), this);
|
||||||
|
|
||||||
boolean running = true;
|
boolean running = true;
|
||||||
|
|
||||||
while (running) {
|
while(running) {
|
||||||
try {
|
try {
|
||||||
if (in.thread != null)
|
if (in.thread != null)
|
||||||
in.thread.join();
|
in.thread.join();
|
||||||
@ -79,28 +69,25 @@ public class Sizer implements MessageConsumer {
|
|||||||
err.thread.join();
|
err.thread.join();
|
||||||
r = process.waitFor();
|
r = process.waitFor();
|
||||||
running = false;
|
running = false;
|
||||||
} catch (InterruptedException intExc) {
|
} catch (InterruptedException intExc) { }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// The default Throwable.toString() never returns null, but apparently
|
// The default Throwable.toString() never returns null, but apparently
|
||||||
// some sub-class has overridden it to do so, thus we need to check for
|
// some sub-class has overridden it to do so, thus we need to check for
|
||||||
// it. See: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1166589459
|
// it. See: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1166589459
|
||||||
if (e.toString() == null)
|
exception = new RunnerException(
|
||||||
exception = new RunnerException(e.getClass().getName() + r);
|
(e.toString() == null) ? e.getClass().getName() + r : e.toString() + r);
|
||||||
else
|
|
||||||
exception = new RunnerException(e.toString() + r);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exception != null)
|
if (exception != null)
|
||||||
throw exception;
|
throw exception;
|
||||||
|
|
||||||
if (size == -1)
|
if (size == -1)
|
||||||
throw new RunnerException(firstLine);
|
throw new RunnerException(firstLine);
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void message(String s) {
|
public void message(String s) {
|
||||||
if (firstLine == null)
|
if (firstLine == null)
|
||||||
firstLine = s;
|
firstLine = s;
|
||||||
|
@ -9,8 +9,7 @@
|
|||||||
<classpathentry kind="lib" path="lib/commons-logging.jar"/>
|
<classpathentry kind="lib" path="lib/commons-logging.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/looks.jar"/>
|
<classpathentry kind="lib" path="lib/looks.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/foxtrot.jar"/>
|
<classpathentry kind="lib" path="lib/foxtrot.jar"/>
|
||||||
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.apache.ant_1.7.0.v200706080842/lib/ant.jar"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/j2sdk1.4.2"/>
|
|
||||||
<classpathentry kind="lib" path="lib/forms.jar"/>
|
<classpathentry kind="lib" path="lib/forms.jar"/>
|
||||||
<classpathentry kind="output" path="build"/>
|
<classpathentry kind="output" path="build"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
#Sun Jul 20 14:10:30 CEST 2008
|
#Wed Jan 11 13:54:29 CET 2012
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.4
|
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.source=1.4
|
org.eclipse.jdt.core.compiler.source=1.6
|
||||||
|
Loading…
x
Reference in New Issue
Block a user