|
600 | 600 | <chmod perm="755">
|
601 | 601 | <fileset dir="windows/work" includes="**/*.html, **/*.dll, **/*.exe" />
|
602 | 602 | </chmod>
|
| 603 | + |
| 604 | + <antcall target="get-arm-toolchain-help" /> |
603 | 605 | </target>
|
604 | 606 |
|
605 | 607 | <target name="windows-run" depends="windows-build"
|
|
608 | 610 | dir="windows/work" spawn="true"/>
|
609 | 611 | </target>
|
610 | 612 |
|
| 613 | + <target name="windows-check-arm-toolchain-distfile"> |
| 614 | + <available file="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" property="arm_distfile_available" /> |
| 615 | + </target> |
| 616 | + |
| 617 | + <target name="windows-get-arm-toolchain" depends="windows-check-arm-toolchain-distfile" unless="arm_distfile_available"> |
| 618 | + <!-- Retrieve ARM toolchain --> |
| 619 | + <get |
| 620 | + src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" |
| 621 | + dest="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" |
| 622 | + verbose="true" /> |
| 623 | + </target> |
| 624 | + |
| 625 | + <target name="windows-check-arm-toolchain"> |
| 626 | + <available file="windows/work/hardware/tools/g++_arm_none_eabi" property="arm_available" /> |
| 627 | + </target> |
| 628 | + |
| 629 | + <target name="windows-unzip-arm-toolchain" depends="windows-get-arm-toolchain, windows-check-arm-toolchain" unless="arm_available"> |
| 630 | + <checksum file="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" algorithm="sha" |
| 631 | + fileext=".sha" verifyproperty="checksum.matches"/> |
| 632 | + <condition property="checksum.matches.fail"> |
| 633 | + <equals arg1="${checksum.matches}" arg2="false"/> |
| 634 | + </condition> |
| 635 | + <fail if="checksum.matches.fail">Checksum failed. |
| 636 | + |
| 637 | + File gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz failed checksum. |
| 638 | + Please remove "windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" to download it again. |
| 639 | + </fail> |
| 640 | + |
| 641 | + <!-- Unzip toolchain to the destination folder --> |
| 642 | + <exec executable="tar"> |
| 643 | + <arg value="xfz"/> |
| 644 | + <arg value="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz"/> |
| 645 | + <arg value="--directory=windows/work/hardware/tools"/> |
| 646 | + </exec> |
| 647 | + </target> |
| 648 | + |
611 | 649 | <target name="windows-dist" depends="windows-build"
|
612 | 650 | description="Create .zip files of windows version">
|
613 | 651 |
|
|
0 commit comments