Skip to content

Commit 784232c

Browse files
committed
Adding 32-bit version of AVR toolchain on Linux (Paul Stoffregen)
http://code.google.com/p/arduino/issues/detail?id=300
1 parent 9f755d1 commit 784232c

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

app/src/processing/app/Base.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,12 +1534,12 @@ static public String getHardwarePath() {
15341534

15351535

15361536
static public String getAvrBasePath() {
1537-
if(Base.isLinux()) {
1538-
return ""; // avr tools are installed system-wide and in the path
1539-
} else {
1540-
return getHardwarePath() + File.separator + "tools" +
1541-
File.separator + "avr" + File.separator + "bin" + File.separator;
1542-
}
1537+
String path = getHardwarePath() + File.separator + "tools" +
1538+
File.separator + "avr" + File.separator + "bin" + File.separator;
1539+
if (Base.isLinux() && !(new File(path)).exists()) {
1540+
return ""; // use distribution provided avr tools if bundled tools missing
1541+
}
1542+
return path;
15431543
}
15441544

15451545

build/build.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,13 @@
349349

350350
<copy todir="linux/work" file="linux/dist/arduino" />
351351
<chmod perm="755" file="linux/work/arduino" />
352+
353+
<!-- Unzip AVR tools -->
354+
<bunzip2 dest="linux" src="linux/avr_tools_linux32.tar.bz2" />
355+
<exec executable="tar" dir="linux/work/hardware">
356+
<arg value="-xvf"/>
357+
<arg value="../../avr_tools_linux32.tar"/>
358+
</exec>
352359
</target>
353360

354361
<target name="linux64-build" depends="linux-build" description="Build linux (64-bit) version">

build/linux/avr_tools_linux32.tar.bz2

8.14 MB
Binary file not shown.

0 commit comments

Comments
 (0)