|
150 | 150 | <!-- Download of toolchains for ARM -->
|
151 | 151 | <!-- - - - - - - - - - - - - - - - - - - -->
|
152 | 152 |
|
153 |
| - <target name="get-arm-toolchain" description="Download and unpack toolchain for ARM"> |
154 |
| - <antcall target="${platform}-get-arm-toolchain" /> |
| 153 | + <target name="unzip-arm-toolchain" description="Unpack toolchain for ARM. Also download latest distribution file if needed."> |
| 154 | + <antcall target="${platform}-unzip-arm-toolchain" /> |
155 | 155 | </target>
|
156 | 156 |
|
157 |
| - <target name="get-arm-toolchain-help" if="arm_not_available"> |
| 157 | + <target name="get-arm-toolchain-help" unless="arm_available"> |
158 | 158 | <echo>
|
159 | 159 | =========================================================
|
160 | 160 | To download and install ARM-gcc toolchain use the command
|
161 | 161 |
|
162 |
| - ant get-arm-toolchain |
| 162 | + ant unzip-arm-toolchain |
163 | 163 | =========================================================
|
164 | 164 | </echo>
|
165 | 165 | </target>
|
|
246 | 246 | <exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="false"/>
|
247 | 247 | </target>
|
248 | 248 |
|
| 249 | + <target name="macosx-check-arm-toolchain-distfile"> |
| 250 | + <available file="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macosx.tar.gz" property="arm_distfile_available" /> |
| 251 | + </target> |
| 252 | + |
| 253 | + <target name="macosx-get-arm-toolchain" depends="macosx-check-arm-toolchain-distfile" unless="arm_distfile_available"> |
| 254 | + <!-- Retrieve ARM toolchain --> |
| 255 | + <get |
| 256 | + src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" |
| 257 | + dest="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" verbose="true" /> |
| 258 | + </target> |
| 259 | + |
249 | 260 | <target name="macosx-check-arm-toolchain">
|
250 | 261 | <available file="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/g++_arm_none_eabi"
|
251 | 262 | property="arm_available" />
|
252 |
| - <condition property="arm_not_available"> |
253 |
| - <not> |
254 |
| - <isset property="arm_available" /> |
255 |
| - </not> |
256 |
| - </condition> |
257 | 263 | </target>
|
258 | 264 |
|
259 |
| - <target name="macosx-get-arm-toolchain" depends="macosx-check-arm-toolchain" if="arm_not_available"> |
260 |
| - <!-- Retrieve ARM toolchain... --> |
261 |
| - <get |
262 |
| - src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" |
263 |
| - dest="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" |
264 |
| - skipexisting="true" verbose="true" /> |
| 265 | + <target name="macosx-unzip-arm-toolchain" depends="macosx-get-arm-toolchain, macosx-check-arm-toolchain" unless="arm_available"> |
265 | 266 | <checksum file="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" algorithm="sha"
|
266 | 267 | fileext=".sha" verifyproperty="checksum.matches"/>
|
267 | 268 | <condition property="checksum.matches.fail">
|
268 | 269 | <equals arg1="${checksum.matches}" arg2="false"/>
|
269 | 270 | </condition>
|
270 |
| - <fail if="checksum.matches.fail"> |
| 271 | + <fail if="checksum.matches.fail">Checksum failed. |
| 272 | + |
271 | 273 | File gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz failed checksum.
|
272 | 274 | Please remove "macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" to download it again.
|
273 | 275 | </fail>
|
|
433 | 435 | <exec executable="./linux/work/arduino" spawn="false"/>
|
434 | 436 | </target>
|
435 | 437 |
|
436 |
| - <target name="linux-check-arm-toolchain"> |
437 |
| - <available file="linux/work/hardware/tools/g++_arm_none_eabi" property="arm_available" /> |
438 |
| - <condition property="arm_not_available"> |
439 |
| - <not> |
440 |
| - <isset property="arm_available" /> |
441 |
| - </not> |
442 |
| - </condition> |
| 438 | + <target name="linux-check-arm-toolchain-distfile"> |
| 439 | + <available file="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" property="arm_distfile_available" /> |
443 | 440 | </target>
|
444 | 441 |
|
445 |
| - <target name="linux-get-arm-toolchain" depends="linux-check-arm-toolchain" if="arm_not_available"> |
446 |
| - <!-- Retrieve ARM toolchain... --> |
| 442 | + <target name="linux-get-arm-toolchain" depends="linux-check-arm-toolchain-distfile" unless="arm_distfile_available"> |
| 443 | + <!-- Retrieve ARM toolchain --> |
447 | 444 | <get
|
448 | 445 | src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz"
|
449 | 446 | dest="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz"
|
450 |
| - skipexisting="true" verbose="true" /> |
| 447 | + verbose="true" /> |
| 448 | + </target> |
| 449 | + |
| 450 | + <target name="linux-check-arm-toolchain"> |
| 451 | + <available file="linux/work/hardware/tools/g++_arm_none_eabi" property="arm_available" /> |
| 452 | + </target> |
| 453 | + |
| 454 | + <target name="linux-unzip-arm-toolchain" depends="linux-get-arm-toolchain, linux-check-arm-toolchain" unless="arm_available"> |
451 | 455 | <checksum file="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" algorithm="sha"
|
452 | 456 | fileext=".sha" verifyproperty="checksum.matches"/>
|
453 | 457 | <condition property="checksum.matches.fail">
|
454 | 458 | <equals arg1="${checksum.matches}" arg2="false"/>
|
455 | 459 | </condition>
|
456 |
| - <fail if="checksum.matches.fail"> |
| 460 | + <fail if="checksum.matches.fail">Checksum failed. |
| 461 | + |
457 | 462 | File gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz failed checksum.
|
458 |
| - Please remove "linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" to download again. |
| 463 | + Please remove "linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" to download it again. |
459 | 464 | </fail>
|
460 | 465 |
|
461 |
| - <!-- ...and unzip on the destination folder --> |
| 466 | + <!-- Unzip toolchain to the destination folder --> |
462 | 467 | <exec executable="tar" output="/dev/null" os="Linux">
|
463 | 468 | <arg value="xfz"/>
|
464 | 469 | <arg value="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz"/>
|
465 | 470 | <arg value="--directory=linux/work/hardware/tools"/>
|
466 | 471 | </exec>
|
467 | 472 | </target>
|
468 | 473 |
|
469 |
| - <target name="linux64-get-arm-toolchain" depends="linux-check-arm-toolchain" if="arm_not_available"> |
| 474 | + <target name="linux64-get-arm-toolchain" depends="linux-check-arm-toolchain-distfile" unless="arm_distfile_available"> |
470 | 475 | <antcall target="linux-get-arm-toolchain" />
|
471 | 476 | </target>
|
472 | 477 |
|
| 478 | + <target name="linux64-unzip-arm-toolchain" depends="linux-get-arm-toolchain" unless="arm_available"> |
| 479 | + <antcall target="linux-unzip-arm-toolchain" /> |
| 480 | + </target> |
| 481 | + |
473 | 482 | <target name="linux-dist" depends="build"
|
474 | 483 | description="Build .tar.gz of linux version">
|
475 | 484 |
|
|
0 commit comments