1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

Appled Hans Steiner's patch to search for avr=tools in path on Linux (instead of requiring symlinks to the Arduino tools directory). Added an upload.verbose preference for dumping details of the upload process.

This commit is contained in:
David A. Mellis
2006-08-27 09:45:28 +00:00
parent 3dbf0d32b2
commit fc1ca8a066
5 changed files with 63 additions and 19 deletions

View File

@ -83,10 +83,20 @@ public class Compiler implements MessageConsumer {
// } catch (IOException e) {
// throw new RunnerException(e.getMessage());
// }
String avrBasePath;
if(Base.isMacOS()) {
avrBasePath = new String("tools/avr/bin/");
}
else if(Base.isLinux()) {
avrBasePath = new String("");
}
else {
avrBasePath = new String(userdir + "tools/avr/bin/");
}
String preCommandCompiler[] = new String[] {
((!Base.isMacOS()) ? "tools/avr/bin/avr-gcc" :
userdir + "tools/avr/bin/avr-gcc"),
avrBasePath + "avr-gcc",
"-c", // compile, don't link
"-g", // include debugging info (so errors include line numbers)
"-Os", // optimize for size
@ -111,8 +121,7 @@ public class Compiler implements MessageConsumer {
}
String preCommandCompilerCPP[] = new String[] {
((!Base.isMacOS()) ? "tools/avr/bin/avr-g++" :
userdir + "tools/avr/bin/avr-g++"),
avrBasePath + "avr-g++",
"-c", // compile, don't link
"-g", // include debugging info (so errors include line numbers)
"-Os", // optimize for size
@ -132,8 +141,7 @@ public class Compiler implements MessageConsumer {
}
String preCommandLinker[] = new String[] {
((!Base.isMacOS()) ? "tools/avr/bin/avr-gcc" :
userdir + "tools/avr/bin/avr-gcc"),
avrBasePath + "avr-gcc",
" ",
"-mmcu=" + Preferences.get("build.mcu"),
"-o",
@ -162,8 +170,7 @@ public class Compiler implements MessageConsumer {
}
String baseCommandObjcopy[] = new String[] {
((!Base.isMacOS()) ? "tools/avr/bin/avr-objcopy" :
userdir + "tools/avr/bin/avr-objcopy"),
avrBasePath + "avr-objcopy",
"-O",
" ",
"-R",