Skip to content

Recompiled AVR toolchain #1806

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 13 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ build/linux/libastylej*
test-bin
*.iml
.idea

hardware/arduino/avr/libraries/Bridge/examples/XivelyClient/passwords.h
.DS_Store
hardware/arduino/avr/libraries/Bridge/examples/XivelyClient/passwords.h
avr-toolchain-*.zip

81 changes: 43 additions & 38 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,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 @@ -236,16 +239,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 Down Expand Up @@ -338,9 +342,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.3.2/" includes="*" />
</chmod>

<replace file="macosx/work/Arduino.app/Contents/Info.plist"
Expand Down Expand Up @@ -467,11 +469,8 @@
<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" />
Expand All @@ -494,18 +493,12 @@
</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">
<param name="dist_file" value="gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" />
Expand All @@ -514,10 +507,9 @@
</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 @@ -528,6 +520,29 @@
<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.3.2.zip" dest="${staging_folder}" usetimestamp="true" ignoreerrors="true" />

<checksum file="${staging_folder}/avr-toolchain-${file_arch}-gcc-4.3.2.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.3.2.zip failed checksum.
Please remove "${staging_folder}/avr-toolchain-${file_arch}-gcc-4.3.2.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.3.2.zip" />
</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 @@ -537,7 +552,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 @@ -681,12 +696,9 @@
</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" />
<unzip src="windows/libastylej-2.03.zip" dest="windows" overwrite="true"/>
Expand Down Expand Up @@ -767,18 +779,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.3.2.zip.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2d1d17a26f1125ae387f4168fb18d40bf52d367c
1 change: 1 addition & 0 deletions build/linux/avr-toolchain-linux64-gcc-4.3.2.zip.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2b97b772bfda8de052663bc48895367142ed79ca
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