Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Turn macosx debugging off. Fixed the issue of object files not being …
…in seperated array entries.

Former-commit-id: 010cff0
  • Loading branch information
ricklon committed May 14, 2011
1 parent faabec3 commit 4ecc6e4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
33 changes: 17 additions & 16 deletions app/src/processing/app/debug/Compiler.java
Expand Up @@ -245,7 +245,7 @@ private List<File> compileFiles(String avrBasePath,
private void execAsynchronously(String command) throws RunnerException
{
{
//logger.debug("execAsynchronously: start");
logger.debug("execAsynchronously: start");
String[] commandArray = command.split("::");

List<String> stringList = new ArrayList<String>();
Expand All @@ -265,16 +265,12 @@ private void execAsynchronously(String command) throws RunnerException
{
//System.out.print(command);
//System.out.println();
// if(logger.isDebugEnabled()) {
/*
for (int i = 0; i < commandArray.length; i++)
{
logger.debug("commandArray: " + commandArray[i]);
if(logger.isDebugEnabled()) {
for (int i = 0; i < commandArray.length; i++) {
logger.debug("commandArray[" + i + "]: " + commandArray[i]);
}
logger.debug("Command: " + command.replace(":"," "));
*/
// }
}
}

firstErrorFound = false; // haven't found any errors yet
Expand Down Expand Up @@ -398,7 +394,7 @@ static private String getCommandCompilerS(String avrBasePath,
ArrayList<String> includePaths, String sourceName, String objectName,
HashMap<String, String> configPreferences)
{

logger.debug("getCommandCompilerS: start");
String baseCommandString = configPreferences.get("recipe.cpp.o.pattern");
MessageFormat compileFormat = new MessageFormat(baseCommandString);
//getIncludes to String
Expand All @@ -420,14 +416,14 @@ static private String getCommandCompilerS(String avrBasePath,
};

return compileFormat.format( Args );


}

//removed static
private String getCommandCompilerC(String avrBasePath,
ArrayList<String> includePaths, String sourceName, String objectName,
HashMap<String, String> configPreferences)
{
logger.debug("getCommandCompilerC: start");
String baseCommandString = configPreferences.get("recipe.c.o.pattern");
MessageFormat compileFormat = new MessageFormat(baseCommandString);
//getIncludes to String
Expand All @@ -454,7 +450,7 @@ static private String getCommandCompilerCPP(String avrBasePath,
ArrayList<String> includePaths, String sourceName, String objectName,
HashMap<String, String> configPreferences)
{

logger.debug("getCommandCompilerCPP: start");
String baseCommandString = configPreferences.get("recipe.cpp.o.pattern");
MessageFormat compileFormat = new MessageFormat(baseCommandString);
//getIncludes to String
Expand Down Expand Up @@ -542,6 +538,7 @@ ArrayList<String> getIncludes(String corePath)
void compileSketch(String avrBasePath, String buildPath, ArrayList<String> includePaths, HashMap<String, String> configPreferences)
throws RunnerException
{
logger.debug("compileSketch: start");
this.objectFiles.addAll(compileFiles(avrBasePath, buildPath, includePaths,
findFilesInPath(buildPath, "S", false),
findFilesInPath(buildPath, "c", false),
Expand All @@ -554,6 +551,7 @@ void compileSketch(String avrBasePath, String buildPath, ArrayList<String> inclu
void compileLibraries (String avrBasePath, String buildPath, ArrayList<String> includePaths, HashMap<String, String> configPreferences)
throws RunnerException
{
logger.debug("compileLibraries: start");
for (File libraryFolder : sketch.getImportedLibraries())
{
File outputFolder = new File(buildPath, libraryFolder.getName());
Expand Down Expand Up @@ -585,6 +583,8 @@ void compileLibraries (String avrBasePath, String buildPath, ArrayList<String> i
void compileCore (String avrBasePath, String buildPath, String corePath, HashMap<String, String> configPreferences)
throws RunnerException
{
logger.debug("compileCore(...) start");

ArrayList<String> includePaths = new ArrayList();
includePaths.add(corePath); //include core path only
String baseCommandString = configPreferences.get("recipe.ar.pattern");
Expand Down Expand Up @@ -623,14 +623,14 @@ void compileCore (String avrBasePath, String buildPath, String corePath, HashMap
void compileLink(String avrBasePath, String buildPath, String corePath, ArrayList<String> includePaths, HashMap<String, String> configPreferences)
throws RunnerException
{

logger.debug("compileLink: start");
String baseCommandString = configPreferences.get("recipe.c.combine.pattern");
String commandString = "";
MessageFormat compileFormat = new MessageFormat(baseCommandString);
String objectFileList = "";

for (File file : objectFiles) {
objectFileList = objectFileList + file.getAbsolutePath() + " ";
objectFileList = objectFileList + file.getAbsolutePath() + "::";
}

Object[] Args = {
Expand All @@ -655,6 +655,7 @@ void compileLink(String avrBasePath, String buildPath, String corePath, ArrayLis
void compileEep (String avrBasePath, String buildPath, ArrayList<String> includePaths, HashMap<String, String> configPreferences)
throws RunnerException
{
logger.debug("compileEep: start");
String baseCommandString = configPreferences.get("recipe.objcopy.eep.pattern");
String commandString = "";
MessageFormat compileFormat = new MessageFormat(baseCommandString);
Expand All @@ -676,7 +677,7 @@ void compileEep (String avrBasePath, String buildPath, ArrayList<String> include
void compileHex (String avrBasePath, String buildPath, ArrayList<String> includePaths, HashMap<String, String> configPreferences)
throws RunnerException
{

logger.debug("compileHex: start");
String baseCommandString = configPreferences.get("recipe.objcopy.hex.pattern");
String commandString = "";
MessageFormat compileFormat = new MessageFormat(baseCommandString);
Expand Down
2 changes: 1 addition & 1 deletion build/build.xml
Expand Up @@ -221,7 +221,7 @@
</target>

<target name="macosx-run" depends="macosx-build" description="Run Mac OS X version">
<exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="false"/>
<exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="true"/>
</target>

<target name="macosx-dist" if="macosx" depends="macosx-build" description="Create a .dmg of the Mac OS X version">
Expand Down

0 comments on commit 4ecc6e4

Please sign in to comment.