Skip to content

Commit 960c517

Browse files
committed
Updated ARM gcc for win32 and macos to version 4.7.4
1 parent ea80402 commit 960c517

5 files changed

+37
-90
lines changed

build/build.xml

Lines changed: 35 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
<condition property="platform" value="linux32"><os family="unix" arch="i386" /></condition>
1717
<condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition>
1818

19+
<condition property="staging_folder" value="macosx"><os family="mac" /></condition>
20+
<condition property="staging_folder" value="windows"><os family="windows" /></condition>
21+
<condition property="staging_folder" value="linux"><os family="unix" arch="i386" /></condition>
22+
<condition property="staging_folder" value="linux"><os family="unix" arch="amd64" /></condition>
23+
24+
<condition property="staging_hardware_folder" value="Arduino.app/Contents/Resources/Java/hardware"><os family="mac" /></condition>
25+
<condition property="staging_hardware_folder" value="hardware"><os family="windows" /></condition>
26+
<condition property="staging_hardware_folder" value="hardware"><os family="unix" arch="i386" /></condition>
27+
<condition property="staging_hardware_folder" value="hardware"><os family="unix" arch="amd64" /></condition>
28+
1929
<!-- Libraries required for running arduino -->
2030
<fileset dir=".." id="runtime.jars">
2131
<include name="core/core.jar" />
@@ -174,7 +184,7 @@
174184
<fail message="wrong platform (${os.name})" />
175185
</target>
176186

177-
<target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build, macosx-check-arm-toolchain" description="Build Mac OS X version">
187+
<target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version">
178188
<mkdir dir="macosx/work" />
179189

180190
<!-- assemble the pde -->
@@ -223,7 +233,11 @@
223233
<param name="target.path" value="macosx/work/Arduino.app/Contents/Resources/Java" />
224234
</antcall>
225235

226-
<antcall target="macosx-unzip-arm-toolchain" />
236+
<antcall target="unzip-arm-toolchain">
237+
<param name="dist_file" value="gcc-arm-none-eabi-4.7.4-2013q2-mac.tar.gz" />
238+
<param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.7.4-2013q2-mac.tar.gz" />
239+
<param name="dist_check_file" value="gcc-arm-none-eabi-4.7.4-2013q2" />
240+
</antcall>
227241

228242
<delete includeEmptyDirs="true" quiet="true">
229243
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools" includes="**/3.4.6/**/*"/>
@@ -241,42 +255,6 @@
241255
<exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="false"/>
242256
</target>
243257

244-
<target name="macosx-check-arm-toolchain-distfile">
245-
<available file="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" property="arm_distfile_available" />
246-
</target>
247-
248-
<target name="macosx-get-arm-toolchain" depends="macosx-check-arm-toolchain-distfile" unless="arm_distfile_available">
249-
<!-- Retrieve ARM toolchain -->
250-
<get
251-
src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz"
252-
dest="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" verbose="true" />
253-
</target>
254-
255-
<target name="macosx-check-arm-toolchain">
256-
<available file="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/g++_arm_none_eabi"
257-
property="arm_available" />
258-
</target>
259-
260-
<target name="macosx-unzip-arm-toolchain" depends="macosx-get-arm-toolchain, macosx-check-arm-toolchain" unless="arm_available">
261-
<checksum file="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" algorithm="sha"
262-
fileext=".sha" verifyproperty="checksum.matches"/>
263-
<condition property="checksum.matches.fail">
264-
<equals arg1="${checksum.matches}" arg2="false"/>
265-
</condition>
266-
<fail if="checksum.matches.fail">Checksum failed.
267-
268-
File gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz failed checksum.
269-
Please remove "macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" to download it again.
270-
</fail>
271-
272-
<!-- ...and unzip on the destination folder -->
273-
<exec executable="tar" output="/dev/null">
274-
<arg value="xfz"/>
275-
<arg value="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz"/>
276-
<arg value="--directory=macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/"/>
277-
</exec>
278-
</target>
279-
280258
<!-- - - - - - - - - - - - - - - - -->
281259
<!-- Sign application for MacOSX. -->
282260
<!-- - - - - - - - - - - - - - - - -->
@@ -475,7 +453,7 @@
475453

476454
<target name="linux32-build" depends="linux-build" description="Build linux (32-bit) version">
477455
<!-- Unzip ARM tools -->
478-
<antcall target="linux-unzip-arm-toolchain">
456+
<antcall target="unzip-arm-toolchain">
479457
<param name="dist_file" value="gcc-arm-none-eabi-4.7.4-2013q2-linux32.tar.gz" />
480458
<param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.7.4-2013q2-linux32.tar.gz" />
481459
<param name="dist_check_file" value="gcc-arm-none-eabi-4.7.4-2013q2" />
@@ -495,7 +473,7 @@
495473
<chmod perm="755" file="linux/work/hardware/tools/avrdude" />
496474

497475
<!-- Unzip ARM tools -->
498-
<antcall target="linux-unzip-arm-toolchain">
476+
<antcall target="unzip-arm-toolchain">
499477
<param name="dist_file" value="gcc-arm-none-eabi-4.7.4-2013q2-linux64.tar.gz" />
500478
<param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.7.4-2013q2-linux64.tar.gz" />
501479
<param name="dist_check_file" value="gcc-arm-none-eabi-4.7.4-2013q2" />
@@ -516,36 +494,36 @@
516494
<exec executable="./linux/work/arduino" spawn="false"/>
517495
</target>
518496

519-
<!-- Set 'arm_disfile_available' property if ARM toolchain dist_file is downloaded -->
497+
<!-- Set 'arm_disfile_available' property if ARM toolchain dist_file is downloaded -->
520498
<!-- Set 'arm_toolchain_installed' property if ARM toolchain is installed in working directory -->
521-
<target name="linux-check-arm-toolchain">
522-
<available file="linux/dist/${dist_file}" property="arm_distfile_available" />
523-
<available file="linux/work/hardware/tools/${dist_check_file}" property="arm_toolchain_installed" />
499+
<target name="check-arm-toolchain">
500+
<available file="${staging_folder}/dist/${dist_file}" property="arm_distfile_available" />
501+
<available file="${staging_folder}/work/hardware/tools/${dist_check_file}" property="arm_toolchain_installed" />
524502
</target>
525503

526504
<!-- Retrieve ARM toolchain -->
527-
<target name="linux-get-arm-toolchain" depends="linux-check-arm-toolchain" unless="arm_distfile_available">
528-
<get src="${dist_url}" dest="linux/dist/${dist_file}" verbose="true" />
505+
<target name="get-arm-toolchain" depends="check-arm-toolchain" unless="arm_distfile_available">
506+
<get src="${dist_url}" dest="${staging_folder}/dist/${dist_file}" verbose="true" />
529507
</target>
530508

531-
<target name="linux-unzip-arm-toolchain" depends="linux-get-arm-toolchain, linux-check-arm-toolchain"
509+
<target name="unzip-arm-toolchain" depends="get-arm-toolchain, check-arm-toolchain"
532510
unless="arm_toolchain_installed">
533-
<checksum file="linux/dist/${dist_file}" algorithm="sha"
511+
<checksum file="${staging_folder}/dist/${dist_file}" algorithm="sha"
534512
fileext=".sha" verifyproperty="checksum.matches"/>
535513
<condition property="checksum.matches.fail">
536514
<equals arg1="${checksum.matches}" arg2="false"/>
537515
</condition>
538516
<fail if="checksum.matches.fail">Checksum failed.
539517

540518
File ${dist_file} failed checksum.
541-
Please remove "linux/dist/${dist_file}" to download it again.
519+
Please remove "${staging_folder}/dist/${dist_file}" to download it again.
542520
</fail>
543521

544522
<!-- Unzip toolchain to the destination folder -->
545523
<exec executable="tar" output="/dev/null" os="Linux">
546524
<arg value="xfz"/>
547-
<arg value="linux/dist/${dist_file}"/>
548-
<arg value="--directory=linux/work/hardware/tools"/>
525+
<arg value="${staging_folder}/dist/${dist_file}"/>
526+
<arg value="--directory=${staging_folder}/work/${staging_hardware_folder}/tools/"/>
549527
</exec>
550528
</target>
551529

@@ -690,7 +668,12 @@
690668
<fileset dir="windows/work" includes="**/*.html, **/*.dll, **/*.exe" />
691669
</chmod>
692670

693-
<antcall target="windows-unzip-arm-toolchain" />
671+
<!-- Unzip ARM toolchain -->
672+
<antcall target="unzip-arm-toolchain">
673+
<param name="dist_file" value="gcc-arm-none-eabi-4.7.4-2013q2-windows.tar.gz" />
674+
<param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.7.4-2013q2-windows.tar.gz" />
675+
<param name="dist_check_file" value="gcc-arm-none-eabi-4.7.4-2013q2" />
676+
</antcall>
694677

695678
<delete includeEmptyDirs="true" quiet="true">
696679
<fileset dir="windows/work/hardware/tools/avr/doc" />
@@ -703,42 +686,6 @@
703686
dir="windows/work" spawn="true"/>
704687
</target>
705688

706-
<target name="windows-check-arm-toolchain-distfile">
707-
<available file="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" property="arm_distfile_available" />
708-
</target>
709-
710-
<target name="windows-get-arm-toolchain" depends="windows-check-arm-toolchain-distfile" unless="arm_distfile_available">
711-
<!-- Retrieve ARM toolchain -->
712-
<get
713-
src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz"
714-
dest="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz"
715-
verbose="true" />
716-
</target>
717-
718-
<target name="windows-check-arm-toolchain">
719-
<available file="windows/work/hardware/tools/g++_arm_none_eabi" property="arm_available" />
720-
</target>
721-
722-
<target name="windows-unzip-arm-toolchain" depends="windows-get-arm-toolchain, windows-check-arm-toolchain" unless="arm_available">
723-
<checksum file="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" algorithm="sha"
724-
fileext=".sha" verifyproperty="checksum.matches"/>
725-
<condition property="checksum.matches.fail">
726-
<equals arg1="${checksum.matches}" arg2="false"/>
727-
</condition>
728-
<fail if="checksum.matches.fail">Checksum failed.
729-
730-
File gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz failed checksum.
731-
Please remove "windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" to download it again.
732-
</fail>
733-
734-
<!-- Unzip toolchain to the destination folder -->
735-
<exec executable="tar">
736-
<arg value="xfz"/>
737-
<arg value="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz"/>
738-
<arg value="--directory=windows/work/hardware/tools"/>
739-
</exec>
740-
</target>
741-
742689
<target name="windows-dist" depends="windows-build"
743690
description="Create .zip files of windows version">
744691

build/macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz.sha

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
a1326c6258f91d9b318570bc619ca8a3b799d8bc

build/windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz.sha

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
c41fa509205b9ced43fc221b6a0cae4223a0842d

0 commit comments

Comments
 (0)