mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-20 21:01:25 +03:00
Addtional debuggin. Trying to find the pins compile issue.
This commit is contained in:
@ -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
|
||||||
|
|
||||||
@ -280,33 +279,10 @@ public class Compiler implements MessageConsumer {
|
|||||||
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),
|
||||||
@ -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),
|
||||||
@ -779,6 +768,12 @@ public class Compiler implements MessageConsumer {
|
|||||||
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 = "";
|
||||||
MessageFormat compileFormat = new MessageFormat(baseCommandString);
|
MessageFormat compileFormat = new MessageFormat(baseCommandString);
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user