Skip to content

Commit ea0acb2

Browse files
author
Federico Fissore
committed
Merge branch 'ide-1.5.x-avr-toolchain' into ide-1.5.x-avr-toolchain-gcc-4.8.1
2 parents 2f1f5a0 + 277a64d commit ea0acb2

File tree

70 files changed

+685
-857
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+685
-857
lines changed

readme.txt renamed to README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,37 @@
1-
Arduino is an open-source physical computing platform based on a simple i/o
1+
Arduino
2+
========
3+
4+
* Arduino is an open-source physical computing platform based on a simple i/o
25
board and a development environment that implements the Processing/Wiring
36
language. Arduino can be used to develop stand-alone interactive objects or
47
can be connected to software on your computer (e.g. Flash, Processing, MaxMSP).
58
The boards can be assembled by hand or purchased preassembled; the open-source
69
IDE can be downloaded for free.
710

8-
For more information, see the website at: http://www.arduino.cc/
11+
* For more information, see the website at: http://www.arduino.cc/
912
or the forums at: http://arduino.cc/forum/
1013

11-
To report a *bug* in the software or to request *a simple enhancement* go to:
14+
* To report a *bug* in the software or to request *a simple enhancement* go to:
1215
http://github.com/arduino/Arduino/issues
1316

14-
More complex requests and technical discussion should go on the Arduino Developers
17+
* More complex requests and technical discussion should go on the Arduino Developers
1518
mailing list:
1619
https://groups.google.com/a/arduino.cc/forum/#!forum/developers
1720

18-
If you're interested in modifying or extending the Arduino software, we strongly
21+
* If you're interested in modifying or extending the Arduino software, we strongly
1922
suggest discussing your ideas on the Developers mailing list *before* starting
2023
to work on them. That way you can coordinate with the Arduino Team and others,
2124
giving your work a higher chance of being integrated into the official release
2225
https://groups.google.com/a/arduino.cc/forum/#!forum/developers
2326

2427
INSTALLATION
28+
------------
2529
Detailed instructions are in reference/Guide_Windows.html and
2630
reference/Guide_MacOSX.html. For Linux, see the Arduino playground:
2731
http://www.arduino.cc/playground/Learning/Linux
2832

2933
CREDITS
34+
--------
3035
Arduino is an open source project, supported by many.
3136

3237
The Arduino team is composed of Massimo Banzi, David Cuartielles, Tom Igoe,

app/src/processing/app/Base.java

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@ public Base(String[] args) throws Exception {
320320

321321
boolean doUpload = false;
322322
boolean doVerify = false;
323-
boolean doVerbose = false;
323+
boolean doVerboseBuild = false;
324+
boolean doVerboseUpload = false;;
324325
String selectBoard = null;
325326
String selectPort = null;
326327
String currentDirectory = System.getProperty("user.dir");
@@ -337,7 +338,16 @@ public Base(String[] args) throws Exception {
337338
continue;
338339
}
339340
if (args[i].equals("--verbose") || args[i].equals("-v")) {
340-
doVerbose = true;
341+
doVerboseBuild = true;
342+
doVerboseUpload = true;
343+
continue;
344+
}
345+
if (args[i].equals("--verbose-build")) {
346+
doVerboseBuild = true;
347+
continue;
348+
}
349+
if (args[i].equals("--verbose-upload")) {
350+
doVerboseUpload = true;
341351
continue;
342352
}
343353
if (args[i].equals("--board")) {
@@ -414,8 +424,8 @@ public Base(String[] args) throws Exception {
414424

415425
if (doUpload || doVerify) {
416426
// Set verbosity for command line build
417-
Preferences.set("build.verbose", "" + doVerbose);
418-
Preferences.set("upload.verbose", "" + doVerbose);
427+
Preferences.set("build.verbose", "" + doVerboseBuild);
428+
Preferences.set("upload.verbose", "" + doVerboseUpload);
419429

420430
Editor editor = editors.get(0);
421431

@@ -1337,6 +1347,14 @@ public void onBoardOrPortChange() {
13371347
try {
13381348
String headers[] = headerListFromIncludePath(lib.getSrcFolder());
13391349
for (String header : headers) {
1350+
Library old = importToLibraryTable.get(header);
1351+
if (old != null) {
1352+
// If a library was already found with this header, keep
1353+
// it if the library's name matches the header name.
1354+
String name = header.substring(0, header.length() - 2);
1355+
if (old.getFolder().getPath().endsWith(name))
1356+
continue;
1357+
}
13401358
importToLibraryTable.put(header, lib);
13411359
}
13421360
} catch (IOException e) {

app/src/processing/app/debug/Compiler.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,18 @@ public void message(String s) {
518518
}
519519
}
520520

521+
if (s.contains("undefined reference to `SPIClass::begin()'") &&
522+
s.contains("libraries/Robot_Control")) {
523+
String error = _("Please import the SPI library from the Sketch > Import Library menu.");
524+
exception = new RunnerException(error);
525+
}
526+
527+
if (s.contains("undefined reference to `Wire'") &&
528+
s.contains("libraries/Robot_Control")) {
529+
String error = _("Please import the Wire library from the Sketch > Import Library menu.");
530+
exception = new RunnerException(error);
531+
}
532+
521533
System.err.print(s);
522534
}
523535

app/test/processing/app/preproc/PdePreprocessorTest.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ public void testSourceWithQuoteAndDoubleQuotesEscapedAndFinalQuoteShouldNotRaise
1414
String s = FileUtils.readFileToString(new File(PdePreprocessorTest.class.getResource("RemoteCallLogger_v1e0.ino").getFile()));
1515

1616
PdePreprocessor pdePreprocessor = new PdePreprocessor();
17-
String stippedOutput = pdePreprocessor.strip(s);
17+
String strippedOutput = pdePreprocessor.strip(s);
1818
String expectedStrippedOutput = FileUtils.readFileToString(new File(PdePreprocessorTest.class.getResource("RemoteCallLogger_v1e0.stripped.ino").getFile()));
1919

20-
assertEquals(expectedStrippedOutput, stippedOutput);
20+
assertEquals(expectedStrippedOutput, strippedOutput);
2121

2222
pdePreprocessor.writePrefix(s);
2323

@@ -36,10 +36,10 @@ public void testIncludeInsideMultilineComment() throws Exception {
3636
String s = FileUtils.readFileToString(new File(PdePreprocessorTest.class.getResource("IncludeBetweenMultilineComment.ino").getFile()));
3737

3838
PdePreprocessor pdePreprocessor = new PdePreprocessor();
39-
String stippedOutput = pdePreprocessor.strip(s);
39+
String strippedOutput = pdePreprocessor.strip(s);
4040
String expectedStrippedOutput = FileUtils.readFileToString(new File(PdePreprocessorTest.class.getResource("IncludeBetweenMultilineComment.stripped.ino").getFile()));
4141

42-
assertEquals(expectedStrippedOutput, stippedOutput);
42+
assertEquals(expectedStrippedOutput, strippedOutput);
4343

4444
pdePreprocessor.writePrefix(s);
4545

@@ -57,10 +57,10 @@ public void testPdePreprocessorRegressionBaladuino() throws Exception {
5757
String s = FileUtils.readFileToString(new File(PdePreprocessorTest.class.getResource("Baladuino.ino").getFile()));
5858

5959
PdePreprocessor pdePreprocessor = new PdePreprocessor();
60-
String stippedOutput = pdePreprocessor.strip(s);
60+
String strippedOutput = pdePreprocessor.strip(s);
6161
String expectedStrippedOutput = FileUtils.readFileToString(new File(PdePreprocessorTest.class.getResource("Baladuino.stripped.ino").getFile()));
6262

63-
assertEquals(expectedStrippedOutput, stippedOutput);
63+
assertEquals(expectedStrippedOutput, strippedOutput);
6464

6565
pdePreprocessor.writePrefix(s);
6666

@@ -86,10 +86,10 @@ public void testStringWithCcomment() throws Exception {
8686
String s = FileUtils.readFileToString(new File(PdePreprocessorTest.class.getResource("StringWithCcomment.ino").getFile()));
8787

8888
PdePreprocessor pdePreprocessor = new PdePreprocessor();
89-
String stippedOutput = pdePreprocessor.strip(s);
89+
String strippedOutput = pdePreprocessor.strip(s);
9090
String expectedStrippedOutput = FileUtils.readFileToString(new File(PdePreprocessorTest.class.getResource("StringWithCcomment.stripped.ino").getFile()));
9191

92-
assertEquals(expectedStrippedOutput, stippedOutput);
92+
assertEquals(expectedStrippedOutput, strippedOutput);
9393

9494
pdePreprocessor.writePrefix(s);
9595

@@ -106,10 +106,10 @@ public void testCharWithEscapedDoubleQuote() throws Exception {
106106
String s = FileUtils.readFileToString(new File(PdePreprocessorTest.class.getResource("CharWithEscapedDoubleQuote.ino").getFile()));
107107

108108
PdePreprocessor pdePreprocessor = new PdePreprocessor();
109-
String stippedOutput = pdePreprocessor.strip(s);
109+
String strippedOutput = pdePreprocessor.strip(s);
110110
String expectedStrippedOutput = FileUtils.readFileToString(new File(PdePreprocessorTest.class.getResource("CharWithEscapedDoubleQuote.stripped.ino").getFile()));
111111

112-
assertEquals(expectedStrippedOutput, stippedOutput);
112+
assertEquals(expectedStrippedOutput, strippedOutput);
113113

114114
pdePreprocessor.writePrefix(s);
115115

@@ -128,10 +128,10 @@ public void testLineContinuations() throws Exception {
128128
String s = FileUtils.readFileToString(new File(PdePreprocessorTest.class.getResource("LineContinuations.ino").getFile()));
129129

130130
PdePreprocessor pdePreprocessor = new PdePreprocessor();
131-
String stippedOutput = pdePreprocessor.strip(s);
131+
String strippedOutput = pdePreprocessor.strip(s);
132132
String expectedStrippedOutput = FileUtils.readFileToString(new File(PdePreprocessorTest.class.getResource("LineContinuations.stripped.ino").getFile()));
133133

134-
assertEquals(expectedStrippedOutput, stippedOutput);
134+
assertEquals(expectedStrippedOutput, strippedOutput);
135135

136136
pdePreprocessor.writePrefix(s);
137137

build/shared/examples/04.Communication/Dimmer/Dimmer.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ void loop() {
5555
size(256, 150);
5656
5757
println("Available serial ports:");
58+
// if using Processing 2.1 or later, use Serial.printArray()
5859
println(Serial.list());
5960
6061
// Uses the first port in this list (number 0). Change this to

build/shared/examples/04.Communication/Graph/Graph.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,17 @@ void loop() {
6363
size(400, 300);
6464
6565
// List all the available serial ports
66+
// if using Processing 2.1 or later, use Serial.printArray()
6667
println(Serial.list());
68+
6769
// I know that the first port in the serial list on my mac
6870
// is always my Arduino, so I open Serial.list()[0].
6971
// Open whatever port is the one you're using.
7072
myPort = new Serial(this, Serial.list()[0], 9600);
73+
7174
// don't generate a serialEvent() unless you get a newline character:
7275
myPort.bufferUntil('\n');
76+
7377
// set inital background:
7478
background(0);
7579
}

build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,19 @@ void loop() {
7878
size(200, 200);
7979
boxX = width/2.0;
8080
boxY = height/2.0;
81-
rectMode(RADIUS);
82-
83-
// List all the available serial ports in the output pane.
84-
// You will need to choose the port that the Arduino board is
85-
// connected to from this list. The first port in the list is
86-
// port #0 and the third port in the list is port #2.
87-
println(Serial.list());
88-
89-
// Open the port that the Arduino board is connected to (in this case #0)
90-
// Make sure to open the port at the same speed Arduino is using (9600bps)
91-
port = new Serial(this, Serial.list()[0], 9600);
92-
81+
rectMode(RADIUS);
82+
83+
// List all the available serial ports in the output pane.
84+
// You will need to choose the port that the Arduino board is
85+
// connected to from this list. The first port in the list is
86+
// port #0 and the third port in the list is port #2.
87+
// if using Processing 2.1 or later, use Serial.printArray()
88+
println(Serial.list());
89+
90+
// Open the port that the Arduino board is connected to (in this case #0)
91+
// Make sure to open the port at the same speed Arduino is using (9600bps)
92+
port = new Serial(this, Serial.list()[0], 9600);
93+
9394
}
9495
9596
void draw()

build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ void setup() {
9292
xpos = width/2;
9393
ypos = height/2;
9494
95-
// Print a list of the serial ports, for debugging purposes:
95+
// Print a list of the serial ports for debugging purposes
96+
// if using Processing 2.1 or later, use Serial.printArray()
9697
println(Serial.list());
9798
9899
// I know that the first port in the serial list on my mac

build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ void setup() {
9191
size(640,480);
9292
9393
// List all the available serial ports
94+
// if using Processing 2.1 or later, use Serial.printArray()
9495
println(Serial.list());
9596
9697
// I know that the first port in the serial list on my mac

build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ void loop()
5050
size(200, 200);
5151
5252
// List all the available serial ports
53+
// if using Processing 2.1 or later, use Serial.printArray()
5354
println(Serial.list());
55+
5456
// I know that the first port in the serial list on my mac
5557
// is always my Arduino, so I open Serial.list()[0].
5658
// Open whatever port is the one you're using.

0 commit comments

Comments
 (0)