Skip to content

Commit 8bab7ce

Browse files
committed
Download the bundled core as any other tool
1 parent d6b40d0 commit 8bab7ce

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

build/avr-1.6.20.tar.bz2.sha

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9b858371109590c2392cbf1c38936623e737848b

build/build.xml

+11-19
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
<property name="LIBLISTSERIAL-VERSION" value="1.4.0" />
9292
<property name="AVRGCC-VERSION" value="4.9.2-atmel3.5.4-arduino2" />
9393
<property name="AVRDUDE-VERSION" value="6.3.0-arduino9" />
94+
<property name="AVRCORE-VERSION" value="1.6.20" />
9495
<property name="arduinoOTA-VERSION" value="1.2.1" />
9596

9697
<!-- Libraries required for running arduino -->
@@ -263,29 +264,20 @@
263264

264265
<!-- copy hardware folder -->
265266
<target name="assemble-hardware" unless="light_bundle">
266-
<copy todir="${target.path}/hardware">
267-
<fileset dir="../hardware">
268-
<exclude name="arduino/sam/**"/>
269-
</fileset>
270-
</copy>
267+
<mkdir dir="${target.path}/hardware/arduino" />
268+
<antcall target="untar">
269+
<param name="archive_file" value="avr-${AVRCORE-VERSION}.tar.bz2"/>
270+
<param name="archive_url" value="https://downloads.arduino.cc/cores/avr-${AVRCORE-VERSION}.tar.bz2"/>
271+
<param name="final_folder" value="${target.path}/hardware/arduino/avr"/>
272+
<param name="dest_folder" value="${target.path}/hardware/arduino"/>
273+
</antcall>
271274
</target>
272275

273276
<!-- - - - - - - - - -->
274277
<!-- Revision check -->
275278
<!-- - - - - - - - - -->
276279
<target name="revision-check">
277280

278-
<!-- figure out the AVR core version number in platform.txt -->
279-
<loadfile srcfile="../hardware/arduino/avr/platform.txt" property="revision.avr.platform">
280-
<filterchain>
281-
<tokenfilter>
282-
<linetokenizer />
283-
<containsregex pattern="version="/>
284-
<replaceregex pattern="version=(.*)" flags="g" replace="\1"/>
285-
</tokenfilter>
286-
</filterchain>
287-
</loadfile>
288-
289281
<!-- figure out the latest AVR core version number in package_index.json -->
290282
<loadfile srcfile="../hardware/package_index_bundled.json" property="revision.avr.index">
291283
<filterchain>
@@ -298,18 +290,18 @@
298290
</filterchain>
299291
</loadfile>
300292

301-
<echo message="AVR Arduino core version in platform.txt is: ${revision.avr.platform}" />
293+
<echo message="AVR Arduino core version in build.xml is: ${AVRCORE-VERSION}" />
302294
<echo message=" latest in package_index_bundled.json is: ${revision.avr.index}" />
303295
<condition property="revision.avr.ok">
304296
<or>
305297
<!-- fail build if -Drevision.check=enforce is set -->
306298
<not><equals arg1="${revision.check}" arg2="enforce"/></not>
307-
<equals arg1="${revision.avr.index}" arg2="${revision.avr.platform}"/>
299+
<equals arg1="${revision.avr.index}" arg2="${AVRCORE-VERSION}"/>
308300
</or>
309301
</condition>
310302
<fail unless="revision.avr.ok">
311303
Mismatching versions for bundled AVR core and package_index_bundled.json.
312-
Please check your platform.txt and package_index_bundled.json.
304+
Please check your package_index_bundled.json.
313305
</fail>
314306

315307
<!-- figure out the IDE version number -->

0 commit comments

Comments
 (0)