1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-19 09:42:11 +03:00

Addtional debuggin. Trying to find the pins compile issue.

This commit is contained in:
ricklon
2011-06-22 21:20:45 -06:00
parent 43a11be3c9
commit dacfa86223
3 changed files with 27 additions and 30 deletions

View File

@ -80,10 +80,10 @@ public class Compiler implements MessageConsumer {
this.buildPath = buildPath; this.buildPath = buildPath;
this.primaryClassName = primaryClassName; this.primaryClassName = primaryClassName;
this.verbose = verbose; this.verbose = verbose;
objectFiles = new ArrayList<File>();
// the pms object isn't used for anything but storage // the pms object isn't used for anything but storage
MessageStream pms = new MessageStream(this); MessageStream pms = new MessageStream(this);
Map<String, String> boardPreferences = Base.getBoardPreferences(); Map<String, String> boardPreferences = Base.getBoardPreferences();
//Check for null platform, and use system default if not found //Check for null platform, and use system default if not found
@ -164,7 +164,6 @@ public class Compiler implements MessageConsumer {
} }
} }
objectFiles = new ArrayList<File>();
// 0. include paths for core + all libraries // 0. include paths for core + all libraries
@ -279,33 +278,10 @@ public class Compiler implements MessageConsumer {
// 5. extract EEPROM data (from EEMEM directive) to .eep file. // 5. extract EEPROM data (from EEMEM directive) to .eep file.
System.out.println("5. compileEep"); System.out.println("5. compileEep");
compileEep(avrBasePath, buildPath, includePaths, configPreferences); compileEep(avrBasePath, buildPath, includePaths, configPreferences);
/*
commandObjcopy = new ArrayList(baseCommandObjcopy);
commandObjcopy.add(2, "ihex");
commandObjcopy.set(3, "-j");
commandObjcopy.add(".eeprom");
commandObjcopy.add("--set-section-flags=.eeprom=alloc,load");
commandObjcopy.add("--no-change-warnings");
commandObjcopy.add("--change-section-lma");
commandObjcopy.add(".eeprom=0");
commandObjcopy.add(buildPath + File.separator + primaryClassName + ".elf");
commandObjcopy.add(buildPath + File.separator + primaryClassName + ".eep");
execAsynchronously(commandObjcopy);
*/
// 6. build the .hex file // 6. build the .hex file
System.out.println("6. compileHex"); System.out.println("6. compileHex");
compileHex(avrBasePath, buildPath, includePaths, configPreferences); compileHex(avrBasePath, buildPath, includePaths, configPreferences);
/*
commandObjcopy = new ArrayList(baseCommandObjcopy);
commandObjcopy.add(2, "ihex");
commandObjcopy.add(".eeprom"); // remove eeprom data
commandObjcopy.add(buildPath + File.separator + primaryClassName + ".elf");
commandObjcopy.add(buildPath + File.separator + primaryClassName + ".hex");
execAsynchronously(commandObjcopy);
*/
return true; return true;
} }
@ -534,7 +510,7 @@ public class Compiler implements MessageConsumer {
configPreferences.get("compiler.cpudef"), configPreferences.get("compiler.cpudef"),
configPreferences.get("build.mcu"), configPreferences.get("build.mcu"),
configPreferences.get("build.f_cpu"), configPreferences.get("build.f_cpu"),
configPreferences.get("board"), configPreferences.get("software"),
Base.REVISION, Base.REVISION,
includes, includes,
sourceName, sourceName,
@ -593,7 +569,7 @@ public class Compiler implements MessageConsumer {
configPreferences.get("compiler.cpudef"), configPreferences.get("compiler.cpudef"),
configPreferences.get("build.mcu"), configPreferences.get("build.mcu"),
configPreferences.get("build.f_cpu"), configPreferences.get("build.f_cpu"),
configPreferences.get("board"), configPreferences.get("software"),
Base.REVISION, Base.REVISION,
includes, includes,
sourceName, sourceName,
@ -652,7 +628,7 @@ public class Compiler implements MessageConsumer {
configPreferences.get("compiler.cpudef"), configPreferences.get("compiler.cpudef"),
configPreferences.get("build.mcu"), configPreferences.get("build.mcu"),
configPreferences.get("build.f_cpu"), configPreferences.get("build.f_cpu"),
configPreferences.get("board"), configPreferences.get("software"),
Base.REVISION, Base.REVISION,
includes, includes,
sourceName, sourceName,
@ -727,6 +703,12 @@ public class Compiler implements MessageConsumer {
void compileSketch(String avrBasePath, String buildPath, ArrayList<String> includePaths, HashMap<String, String> configPreferences) void compileSketch(String avrBasePath, String buildPath, ArrayList<String> includePaths, HashMap<String, String> configPreferences)
throws RunnerException throws RunnerException
{ {
System.out.println("compileSketch: start");
System.out.println("includePaths: ");
for (int i = 0; i < includePaths.size(); i++) {
System.out.println("-I" + (String) includePaths.get(i));
}
//logger.debug("compileSketch: start"); //logger.debug("compileSketch: start");
this.objectFiles.addAll(compileFiles(avrBasePath, buildPath, includePaths, this.objectFiles.addAll(compileFiles(avrBasePath, buildPath, includePaths,
findFilesInPath(buildPath, "S", false), findFilesInPath(buildPath, "S", false),
@ -741,7 +723,7 @@ public class Compiler implements MessageConsumer {
throws RunnerException throws RunnerException
{ {
System.out.println("compileLibraries: start"); System.out.println("compileLibraries: start");
for (File libraryFolder : sketch.getImportedLibraries()) { for (File libraryFolder : sketch.getImportedLibraries()) {
System.out.println("libraryFolder: " + libraryFolder); System.out.println("libraryFolder: " + libraryFolder);
File outputFolder = new File(buildPath, libraryFolder.getName()); File outputFolder = new File(buildPath, libraryFolder.getName());
@ -749,6 +731,13 @@ public class Compiler implements MessageConsumer {
createFolder(outputFolder); createFolder(outputFolder);
// this library can use includes in its utility/ folder // this library can use includes in its utility/ folder
includePaths.add(utilityFolder.getAbsolutePath()); includePaths.add(utilityFolder.getAbsolutePath());
//debug includePaths
System.out.println("includePaths: ");
for (int i = 0; i < includePaths.size(); i++) {
System.out.println("-I" + (String) includePaths.get(i));
}
objectFiles.addAll( objectFiles.addAll(
compileFiles(avrBasePath, outputFolder.getAbsolutePath(), includePaths, compileFiles(avrBasePath, outputFolder.getAbsolutePath(), includePaths,
findFilesInFolder(libraryFolder, "S", false), findFilesInFolder(libraryFolder, "S", false),
@ -778,6 +767,12 @@ public class Compiler implements MessageConsumer {
ArrayList<String> includePaths = new ArrayList(); ArrayList<String> includePaths = new ArrayList();
includePaths.add(corePath); //include core path only includePaths.add(corePath); //include core path only
if (pinsPath != null) includePaths.add(pinsPath); if (pinsPath != null) includePaths.add(pinsPath);
//debug includePaths
System.out.println("includePaths: ");
for (int i = 0; i < includePaths.size(); i++) {
System.out.println("-I" + (String) includePaths.get(i));
}
String baseCommandString = configPreferences.get("recipe.ar.pattern"); String baseCommandString = configPreferences.get("recipe.ar.pattern");
String commandString = ""; String commandString = "";

View File

@ -240,6 +240,7 @@ run.present.exclusive.macosx = true
board = uno board = uno
target = arduino target = arduino
platform = avr platform = avr
software=ARDUINO
programmer = arduino:avrispmkii programmer = arduino:avrispmkii

View File

@ -58,6 +58,7 @@ avr.compiler.ldflags=
avr.compiler.cpudef=-mmcu= avr.compiler.cpudef=-mmcu=
avr.compiler.upload.cmd= avr.compiler.upload.cmd=
avr.compiler.upload.flags= avr.compiler.upload.flags=
avr.compiler.define=-DARDUINO=
avr.library.path=./hardware/arduino/cores/arduino avr.library.path=./hardware/arduino/cores/arduino
avr.library.core.path=./libraries avr.library.core.path=./libraries