Skip to content

New AVR toolchain #1903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 46 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
5eb21f3
New common AVR toolchain
Jan 11, 2014
a23fd5f
Added missing DLLs
Jan 12, 2014
24d05d7
Fixed MacOSX AVR toolchain .zip checksum
Jan 12, 2014
db88e17
Updated avr toolchain for macosx: should be compatible with macosx 10…
Jan 14, 2014
fbdb480
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain
Jan 17, 2014
e63b942
Toolchains updated, sha1sum updates follow
Jan 19, 2014
201e8c7
Toolchains updated, sha1sum updates follow
Jan 23, 2014
a111f82
Merge remote-tracking branch 'arduino/ide-1.5.x' into ide-1.5.x-avr-t…
Jan 23, 2014
cb732b1
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain
Jan 30, 2014
a4fb116
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain
Jan 30, 2014
40ef449
New toolchain: gcc 4.8.1, avr-libc 1.8.0, binutils 2.23.2
Feb 4, 2014
2f1f5a0
New toolchain: macosx fix
Feb 4, 2014
277a64d
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain
Feb 17, 2014
ea0acb2
Merge branch 'ide-1.5.x-avr-toolchain' into ide-1.5.x-avr-toolchain-g…
Feb 17, 2014
cb10999
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain
Feb 17, 2014
2b5e73f
Merge branch 'ide-1.5.x-avr-toolchain' into ide-1.5.x-avr-toolchain-g…
Feb 17, 2014
f67919c
Manual merge ide.1.5.x
Feb 26, 2014
c3ee7ed
Manual merge ide.1.5.x-avr-toolchain
Feb 26, 2014
a966acd
Toolchains updated: avrdude 6.0.1 replaces 5.11
Feb 27, 2014
86abe3d
Added 'unzip-tool' target in build.xml
Feb 8, 2014
c878f43
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
Mar 1, 2014
9555bcf
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
Mar 14, 2014
eff4918
Manual merge
Mar 17, 2014
67102e1
Updated toolchains
Mar 18, 2014
0c7f015
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
Apr 1, 2014
30a58cd
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
Apr 2, 2014
25747e3
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
Apr 3, 2014
69ef946
Toolchain update
Apr 4, 2014
c30bba0
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
Apr 14, 2014
98a7e03
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
Apr 17, 2014
fd0793e
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
Apr 17, 2014
e2de88c
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
Apr 23, 2014
b34c973
Enabling link-time optimization. See #660
Apr 28, 2014
63a271e
Setting CYGWIN=nodosfilewarning env variable on windows
Apr 28, 2014
b119e38
gcc: Adding -w flag to compiler.c.elf.flags in order to avoid printin…
Apr 29, 2014
f42884d
Fixed compilation error when targetting Mega. Error is caused by #203…
Apr 30, 2014
4ad2511
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
May 5, 2014
f469955
Merge remote-tracking branch 'arduino/ide-1.5.x' into ide-1.5.x-avr-t…
May 14, 2014
553d585
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
May 14, 2014
ec28382
Removed patch for old malloc bug (no more useful with updated toolchain)
cmaglie May 19, 2014
b5b42a2
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
May 21, 2014
7cc2b1b
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
May 24, 2014
a00349a
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
May 30, 2014
ce66554
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
May 30, 2014
0fa223a
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
Jun 13, 2014
da7d1bb
Merge branch 'ide-1.5.x' into ide-1.5.x-avr-toolchain-gcc-4.8.1
Jun 19, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@ test-bin
*.iml
.idea
.DS_Store
build/windows/launch4j-*
build/windows/launcher/launch4j
build/windows/WinAVR-*.zip
hardware/arduino/avr/libraries/Bridge/examples/XivelyClient/passwords.h
avr-toolchain-*.zip
11 changes: 8 additions & 3 deletions app/src/processing/app/helpers/ProcessUtils.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package processing.app.helpers;

import java.io.IOException;

import processing.app.Base;

import java.io.IOException;
import java.util.Map;

public class ProcessUtils {

public static Process exec(String[] command) throws IOException {
Expand All @@ -20,6 +21,10 @@ public static Process exec(String[] command) throws IOException {
String[] cmdLine = new String[command.length];
for (int i = 0; i < command.length; i++)
cmdLine[i] = command[i].replace("\"", "\\\"");
return Runtime.getRuntime().exec(cmdLine);

ProcessBuilder pb = new ProcessBuilder(cmdLine);
Map<String, String> env = pb.environment();
env.put("CYGWIN", "nodosfilewarning");
return pb.start();
}
}
130 changes: 87 additions & 43 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,11 @@
</copy>

<!-- Unzip AVR tools -->
<!-- <unzip dest="macosx/work/Arduino.app/Contents/Resources/Java/hardware" src="macosx/dist/tools-universal.zip" overwrite="false"/> -->
<antcall target="unzip-avr-toolchain">
<param name="file_arch" value="mac32" />
</antcall>

<!--
<exec executable="unzip">
<arg value="-q" />
<arg value="-n" />
Expand All @@ -239,16 +242,17 @@
<arg value="macosx/dist/tools-universal.zip" />
</exec>

<copy todir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/include/avr">
<fileset file="macosx/dist/eeprom.h" />
</copy>
-->

<copy todir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/">
<fileset file="macosx/dist/bossac" />
</copy>

<chmod file="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/bossac" perm="+x" />

<copy todir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/include/avr">
<fileset file="macosx/dist/eeprom.h" />
</copy>

<antcall target="assemble">
<param name="target.path" value="macosx/work/Arduino.app/Contents/Resources/Java" />
</antcall>
Expand All @@ -266,7 +270,7 @@
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools" includes="**/man"/>
</delete>

<get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="macosx" usetimestamp="true" skipexisting="true"/>
<get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="macosx" usetimestamp="true" skipexisting="true" verbose="true" />
<unzip src="macosx/libastylej-2.03.zip" dest="macosx" overwrite="true"/>
<copy file="macosx/libastylej/libastylej.jnilib" todir="macosx/work/Arduino.app/Contents/Resources/Java/lib/" />
<chmod perm="755" file="macosx/work/Arduino.app/Contents/Resources/Java/lib/libastylej.jnilib" />
Expand Down Expand Up @@ -341,9 +345,7 @@
<chmod perm="+x">
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin" includes="**/*" />
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/bin" includes="**/*" />
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-3/bin" includes="**/*" />
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-4/bin" includes="**/*" />
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/4.3.2/" includes="**/cc1*" />
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/4.8.1/" includes="*" />
</chmod>

<replace file="macosx/work/Arduino.app/Contents/Info.plist"
Expand Down Expand Up @@ -470,19 +472,16 @@
<mkdir dir="linux/work/hardware/tools" />
<copy file="linux/dist/tools/adk2install" todir="linux/work/hardware/tools" />
<copy file="linux/dist/tools/adk2tool" todir="linux/work/hardware/tools" />
<copy file="linux/dist/tools/avrdude${arch-bits}" tofile="linux/work/hardware/tools/avrdude" />
<copy file="linux/dist/tools/avrdude.conf" todir="linux/work/hardware/tools" />
<copy file="linux/dist/tools/bossac${arch-bits}" tofile="linux/work/hardware/tools/bossac" />

<chmod perm="755" file="linux/work/hardware/tools/avrdude" />
<chmod perm="755" file="linux/work/hardware/tools/bossac" />
<chmod perm="755" file="linux/work/hardware/tools/adk2tool" />
<chmod perm="755" file="linux/work/hardware/tools/adk2install" />

<copy todir="linux/work" file="linux/dist/arduino" />
<chmod perm="755" file="linux/work/arduino" />

<get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="linux" usetimestamp="true" skipexisting="true" />
<get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="linux" usetimestamp="true" skipexisting="true" verbose="true" />
<unzip src="linux/libastylej-2.03.zip" dest="linux" overwrite="true"/>
<copy file="linux/libastylej/libastylej${arch-bits}.so" tofile="linux/work/lib/libastylej.so" />
<chmod perm="755" file="linux/work/lib/libastylej.so" />
Expand All @@ -497,30 +496,23 @@
</antcall>

<!-- Unzip AVR tools -->
<exec executable="tar" dir="linux/work/hardware">
<arg value="-xjf"/>
<arg value="../../avr_tools_linux32.tar.bz2"/>
</exec>

<antcall target="unzip-avr-toolchain">
<param name="file_arch" value="linux32" />
</antcall>
</target>

<target name="linux64-build" depends="linux-build" description="Build linux (64-bit) version">
<copy tofile="linux/work/hardware/tools/avrdude" file="linux/dist/tools/avrdude64" overwrite="true" />

<chmod perm="755" file="linux/work/hardware/tools/avrdude" />

<!-- Unzip ARM tools -->
<antcall target="unzip-arm-toolchain">
<antcall target="unzip-tool">
<param name="dist_file" value="gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" />
<param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" />
<param name="dist_check_file" value="g++_arm_none_eabi" />
</antcall>

<!-- Unzip AVR tools -->
<exec executable="tar" dir="linux/work/hardware">
<arg value="-xjf"/>
<arg value="../../avr_tools_linux64.tar.bz2"/>
</exec>
<antcall target="unzip-avr-toolchain">
<param name="file_arch" value="linux64" />
</antcall>
</target>

<target name="linux32-run" depends="linux32-build" description="Run Linux (32-bit) version">
Expand All @@ -531,6 +523,68 @@
<exec executable="./linux/work/arduino" spawn="false"/>
</target>

<target name="unzip-avr-toolchain">
<get src="http://downloads.arduino.cc/avr-toolchain-${file_arch}-gcc-4.8.1.zip" dest="${staging_folder}" usetimestamp="true" ignoreerrors="true" verbose="true" />

<checksum file="${staging_folder}/avr-toolchain-${file_arch}-gcc-4.8.1.zip" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/>
<condition property="checksum.matches.fail">
<equals arg1="${checksum.matches}" arg2="false"/>
</condition>
<fail if="checksum.matches.fail">Checksum failed.

File avr-toolchain-${file_arch}-gcc-4.8.1.zip failed checksum.
Please remove "${staging_folder}/avr-toolchain-${file_arch}-gcc-4.8.1.zip" and download it again.
</fail>

<mkdir dir="${staging_folder}/work/${staging_hardware_folder}/tools/avr" />
<exec executable="unzip">
<arg value="-q" />
<arg value="-n" />
<arg value="-d" />
<arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr" />
<arg value="${staging_folder}/avr-toolchain-${file_arch}-gcc-4.8.1.zip" />
</exec>
</target>



<!-- Set '${dist_file}_available' property if toolchain dist_file is downloaded -->
<!-- Set '${dist_file}_installed' property if toolchain is installed in working directory -->
<!-- hardware/tools/${dist_check_file} is checked for existence -->
<target name="check-tool">
<available file="${staging_folder}/dist/${dist_file}" property="${dist_file}_available" />
<available file="${staging_folder}/work/hardware/tools/${dist_check_file}" property="${dist_file}_installed" />
</target>

<!-- Retrieve tool -->
<target name="get-tool" depends="check-tool" unless="${dist_file}_available">
<get src="${dist_url}" dest="${staging_folder}/dist/${dist_file}" verbose="true" ignoreerrors="true" />
</target>

<!-- Ensure that the tool is downloaded and test checksums, if everything's ok unzip it on the tools folder -->
<target name="unzip-tool" depends="get-tool, check-tool" unless="${dist_file}_installed">
<echo>Testing checksum of "${staging_folder}/dist/${dist_file}"</echo>
<checksum file="${staging_folder}/dist/${dist_file}" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/>
<condition property="checksum.matches.fail">
<equals arg1="${checksum.matches}" arg2="false"/>
</condition>
<fail if="checksum.matches.fail">Checksum failed.

File ${dist_file} failed checksum.
Please remove "${staging_folder}/dist/${dist_file}" to download it again.
</fail>

<!-- Unzip tool to the destination folder -->
<echo>Unzipping into folder ${staging_folder}/dist/${dist_file}</echo>
<exec executable="tar">
<arg value="xfz"/>
<arg value="${staging_folder}/dist/${dist_file}"/>
<arg value="--directory=${staging_folder}/work/${staging_hardware_folder}/tools/"/>
</exec>
</target>



<!-- Set 'arm_disfile_available' property if ARM toolchain dist_file is downloaded -->
<!-- Set 'arm_toolchain_installed' property if ARM toolchain is installed in working directory -->
<target name="check-arm-toolchain">
Expand All @@ -540,7 +594,7 @@

<!-- Retrieve ARM toolchain -->
<target name="get-arm-toolchain" depends="check-arm-toolchain" unless="arm_distfile_available">
<get src="${dist_url}" dest="${staging_folder}/dist/${dist_file}" verbose="true" />
<get src="${dist_url}" dest="${staging_folder}/dist/${dist_file}" verbose="true" ignoreerrors="true" />
</target>

<target name="unzip-arm-toolchain" depends="get-arm-toolchain, check-arm-toolchain"
Expand Down Expand Up @@ -684,14 +738,11 @@
</copy>

<!-- Unzip AVR tools -->
<get src="http://downloads.arduino.cc/WinAVR-20081205-arduino-2.zip" dest="windows" usetimestamp="true" skipexisting="true" verbose="true" />
<unzip dest="windows/work/hardware" src="windows/WinAVR-20081205-arduino-2.zip" overwrite="false"/>

<copy todir="windows/work/hardware/tools/avr/avr/include/avr">
<fileset file="windows/eeprom.h" />
</copy>
<antcall target="unzip-avr-toolchain">
<param name="file_arch" value="win32" />
</antcall>

<get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="windows" usetimestamp="true" skipexisting="true" />
<get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="windows" usetimestamp="true" skipexisting="true" verbose="true" />
<unzip src="windows/libastylej-2.03.zip" dest="windows" overwrite="true"/>
<copy file="windows/libastylej/AStylej.dll" todir="windows/work/lib" />

Expand Down Expand Up @@ -751,7 +802,7 @@
<target name="windows-dist" depends="windows-build"
description="Create .zip files of windows version">

<get src="http://downloads.arduino.cc/jre_7u40_windows_i586.zip" dest="windows/jre.zip" usetimestamp="true" skipexisting="true" />
<get src="http://downloads.arduino.cc/jre_7u40_windows_i586.zip" dest="windows/jre.zip" usetimestamp="true" skipexisting="true" verbose="true" />

<unzip dest="windows/work" src="windows/jre.zip" overwrite="false"/>

Expand All @@ -770,18 +821,11 @@
prefix="arduino-${version}" />
</zip>

<zip destfile="windows/arduino-${version}-${platform}-expert.zip" level="9">
<zipfileset dir="windows/work"
prefix="arduino-${version}"
excludes="java/**" />
</zip>

<echo>
=======================================================
Arduino for Windows was built. Grab the archive from

windows/arduino-${version}-${platform}.zip
windows/arduino-${version}-${platform}-expert.zip
=======================================================
</echo>
</target>
Expand Down
1 change: 1 addition & 0 deletions build/linux/avr-toolchain-linux32-gcc-4.8.1.zip.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
60f9edb4dd033109e22ee9e87cb6f45efd15882e
1 change: 1 addition & 0 deletions build/linux/avr-toolchain-linux64-gcc-4.8.1.zip.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5b0131ac2ccf20637d16ecc40a0ef2fae48fe73a
Binary file removed build/linux/avr_tools_linux32.tar.bz2
Binary file not shown.
Binary file removed build/linux/avr_tools_linux64.tar.bz2
Binary file not shown.
Loading