|
11 | 11 | <condition property="linux32"><os family="unix" arch="i386" /></condition>
|
12 | 12 | <condition property="linux64"><os family="unix" arch="amd64" /></condition>
|
13 | 13 |
|
14 |
| - <condition property="platform" |
15 |
| - value="macosx"><os family="mac" /></condition> |
16 |
| - <condition property="platform" |
17 |
| - value="windows"><os family="windows" /></condition> |
18 |
| - <condition property="platform" |
19 |
| - value="linux32"><os family="unix" arch="i386" /></condition> |
20 |
| - <condition property="platform" |
21 |
| - value="linux64"><os family="unix" arch="amd64" /></condition> |
| 14 | + <condition property="platform" value="macosx"><os family="mac" /></condition> |
| 15 | + <condition property="platform" value="windows"><os family="windows" /></condition> |
| 16 | + <condition property="platform" value="linux32"><os family="unix" arch="i386" /></condition> |
| 17 | + <condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition> |
22 | 18 |
|
23 | 19 | <!-- Libraries required for running arduino -->
|
24 | 20 | <fileset dir=".." id="runtime.jars">
|
|
440 | 436 | <fail message="wrong platform (${os.name})" />
|
441 | 437 | </target>
|
442 | 438 |
|
443 |
| - <target name="linux-build" depends="revision-check, linux-checkos, subprojects-build, linux-check-arm-toolchain" description="Build linux version"> |
| 439 | + <target name="linux-build" depends="revision-check, linux-checkos, subprojects-build" description="Build linux version"> |
444 | 440 | <mkdir dir="linux/work" />
|
445 | 441 |
|
446 | 442 | <copy todir="linux/work">
|
|
475 | 471 |
|
476 | 472 | <copy todir="linux/work" file="linux/dist/arduino" />
|
477 | 473 | <chmod perm="755" file="linux/work/arduino" />
|
478 |
| - |
479 |
| - <antcall target="linux-unzip-arm-toolchain" /> |
480 | 474 | </target>
|
481 | 475 |
|
482 | 476 | <target name="linux32-build" depends="linux-build" description="Build linux (32-bit) version">
|
| 477 | + <!-- Unzip ARM tools --> |
| 478 | + <antcall target="linux-unzip-arm-toolchain"> |
| 479 | + <param name="dist_file" value="gcc-arm-none-eabi-4.7.4-2013q2-linux32.tar.gz" /> |
| 480 | + <param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.7.4-2013q2-linux32.tar.gz" /> |
| 481 | + <param name="dist_check_file" value="gcc-arm-none-eabi-4.7.4-2013q2" /> |
| 482 | + </antcall> |
| 483 | + |
483 | 484 | <!-- Unzip AVR tools -->
|
484 | 485 | <exec executable="tar" dir="linux/work/hardware">
|
485 | 486 | <arg value="-xjf"/>
|
|
493 | 494 |
|
494 | 495 | <chmod perm="755" file="linux/work/hardware/tools/avrdude" />
|
495 | 496 |
|
| 497 | + <!-- Unzip ARM tools --> |
| 498 | + <antcall target="linux-unzip-arm-toolchain"> |
| 499 | + <param name="dist_file" value="gcc-arm-none-eabi-4.7.4-2013q2-linux64.tar.gz" /> |
| 500 | + <param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.7.4-2013q2-linux64.tar.gz" /> |
| 501 | + <param name="dist_check_file" value="gcc-arm-none-eabi-4.7.4-2013q2" /> |
| 502 | + </antcall> |
| 503 | + |
496 | 504 | <!-- Unzip AVR tools -->
|
497 | 505 | <exec executable="tar" dir="linux/work/hardware">
|
498 | 506 | <arg value="-xjf"/>
|
499 | 507 | <arg value="../../avr_tools_linux64.tar.bz2"/>
|
500 | 508 | </exec>
|
501 | 509 | </target>
|
502 | 510 |
|
503 |
| - <target name="linux32-run" depends="linux32-build" |
504 |
| - description="Run Linux (32-bit) version"> |
| 511 | + <target name="linux32-run" depends="linux32-build" description="Run Linux (32-bit) version"> |
505 | 512 | <exec executable="./linux/work/arduino" spawn="false"/>
|
506 | 513 | </target>
|
507 | 514 |
|
508 |
| - <target name="linux64-run" depends="linux64-build" |
509 |
| - description="Run Linux (64-bit) version"> |
| 515 | + <target name="linux64-run" depends="linux64-build" description="Run Linux (64-bit) version"> |
510 | 516 | <exec executable="./linux/work/arduino" spawn="false"/>
|
511 | 517 | </target>
|
512 | 518 |
|
513 |
| - <target name="linux-check-arm-toolchain-distfile"> |
514 |
| - <available file="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" property="arm_distfile_available" /> |
515 |
| - </target> |
516 |
| - |
517 |
| - <target name="linux-get-arm-toolchain" depends="linux-check-arm-toolchain-distfile" unless="arm_distfile_available"> |
518 |
| - <!-- Retrieve ARM toolchain --> |
519 |
| - <get |
520 |
| - src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" |
521 |
| - dest="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" |
522 |
| - verbose="true" /> |
| 519 | + <!-- Set 'arm_disfile_available' property if ARM toolchain dist_file is downloaded --> |
| 520 | + <!-- 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" /> |
523 | 524 | </target>
|
524 | 525 |
|
525 |
| - <target name="linux-check-arm-toolchain"> |
526 |
| - <available file="linux/work/hardware/tools/g++_arm_none_eabi" property="arm_available" /> |
| 526 | + <!-- 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" /> |
527 | 529 | </target>
|
528 | 530 |
|
529 |
| - <target name="linux-unzip-arm-toolchain" depends="linux-get-arm-toolchain, linux-check-arm-toolchain" unless="arm_available"> |
530 |
| - <checksum file="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" algorithm="sha" |
| 531 | + <target name="linux-unzip-arm-toolchain" depends="linux-get-arm-toolchain, linux-check-arm-toolchain" |
| 532 | + unless="arm_toolchain_installed"> |
| 533 | + <checksum file="linux/dist/${dist_file}" algorithm="sha" |
531 | 534 | fileext=".sha" verifyproperty="checksum.matches"/>
|
532 | 535 | <condition property="checksum.matches.fail">
|
533 | 536 | <equals arg1="${checksum.matches}" arg2="false"/>
|
534 | 537 | </condition>
|
535 | 538 | <fail if="checksum.matches.fail">Checksum failed.
|
536 | 539 |
|
537 |
| - File gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz failed checksum. |
538 |
| - Please remove "linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" to download it again. |
| 540 | + File ${dist_file} failed checksum. |
| 541 | + Please remove "linux/dist/${dist_file}" to download it again. |
539 | 542 | </fail>
|
540 | 543 |
|
541 | 544 | <!-- Unzip toolchain to the destination folder -->
|
542 | 545 | <exec executable="tar" output="/dev/null" os="Linux">
|
543 | 546 | <arg value="xfz"/>
|
544 |
| - <arg value="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz"/> |
| 547 | + <arg value="linux/dist/${dist_file}"/> |
545 | 548 | <arg value="--directory=linux/work/hardware/tools"/>
|
546 | 549 | </exec>
|
547 | 550 | </target>
|
548 | 551 |
|
549 |
| - <target name="linux64-get-arm-toolchain" depends="linux-check-arm-toolchain-distfile" unless="arm_distfile_available"> |
550 |
| - <antcall target="linux-get-arm-toolchain" /> |
551 |
| - </target> |
552 |
| - |
553 |
| - <target name="linux64-unzip-arm-toolchain" depends="linux-get-arm-toolchain" unless="arm_available"> |
554 |
| - <antcall target="linux-unzip-arm-toolchain" /> |
555 |
| - </target> |
556 |
| - |
557 | 552 | <target name="linux-dist" depends="build"
|
558 | 553 | description="Build .tar.gz of linux version">
|
559 | 554 |
|
|
0 commit comments