1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-01 03:47:23 +03:00

Third-party cores seems to sort of work now, but burning bootloaders is probably broken.

Need to decide on the format for the boards.txt file.
This commit is contained in:
David A. Mellis
2009-11-07 18:56:45 +00:00
parent 3075c8e4fd
commit e5b5f25476
7 changed files with 82 additions and 106 deletions

View File

@ -71,23 +71,25 @@ public class Compiler implements MessageConsumer {
MessageStream pms = new MessageStream(this);
String avrBasePath = Base.getAvrBasePath();
String corePath = Preferences.get("boards", "board", "build.core");
String platform = Preferences.get("boards", "board", "build.core");
File platformFile = Base.platformsTable.get(platform);
String corePath = new File(platformFile, "core").getAbsolutePath();
List<File> objectFiles = new ArrayList<File>();
List includePaths = new ArrayList();
includePaths.add(target.getPath());
includePaths.add(corePath);
String runtimeLibraryName = buildPath + File.separator + "core.a";
// 1. compile the target (core), outputting .o files to <buildPath> and
// then collecting them into the core.a library file.
// 1. compile the core, outputting .o files to <buildPath> and then
// collecting them into the core.a library file.
List<File> targetObjectFiles =
List<File> coreObjectFiles =
compileFiles(avrBasePath, buildPath, includePaths,
findFilesInPath(target.getPath(), "S", true),
findFilesInPath(target.getPath(), "c", true),
findFilesInPath(target.getPath(), "cpp", true));
findFilesInPath(corePath, "S", true),
findFilesInPath(corePath, "c", true),
findFilesInPath(corePath, "cpp", true));
List baseCommandAR = new ArrayList(Arrays.asList(new String[] {
avrBasePath + "avr-ar",
@ -95,7 +97,7 @@ public class Compiler implements MessageConsumer {
runtimeLibraryName
}));
for(File file : targetObjectFiles) {
for(File file : coreObjectFiles) {
List commandAR = new ArrayList(baseCommandAR);
commandAR.add(file.getAbsolutePath());
execAsynchronously(commandAR);