Skip to content

Commit 93b648d

Browse files
author
ficeto
committed
Merge pull request #27 from esp8266/esp8266
pull master
2 parents 81d038f + 0efc787 commit 93b648d

14 files changed

+161
-35
lines changed

build/build.xml

+27-23
Original file line numberDiff line numberDiff line change
@@ -390,21 +390,21 @@
390390
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools" />
391391

392392
<antcall target="untar">
393-
<param name="archive_file" value="${staging_folder}/dist/osx-xtensa-lx106-elf.tgz" />
394-
<param name="archive_url" value="http://download.igrr.me/osx-xtensa-lx106-elf.tgz" />
393+
<param name="archive_file" value="${staging_folder}/dist/osx-xtensa-lx106-elf-gb404fb9.tgz" />
394+
<param name="archive_url" value="http://download.igrr.me/osx-xtensa-lx106-elf-gb404fb9.tgz" />
395395
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/xtensa-lx106-elf" />
396396
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/" />
397397
</antcall>
398398

399399

400-
<antcall target="unzip">
401-
<param name="archive_file" value="${staging_folder}/esptool-0.4.3-osx.zip" />
402-
<param name="archive_url" value="https://github.com/igrr/esptool-ck/releases/download/0.4.3/esptool-0.4.3-osx.zip" />
403-
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.3-osx" />
400+
<antcall target="untar">
401+
<param name="archive_file" value="${staging_folder}/esptool-0.4.4-osx.tar.gz" />
402+
<param name="archive_url" value="https://github.com/igrr/esptool-ck/releases/download/0.4.4/esptool-0.4.4-osx.tar.gz" />
403+
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.4-osx" />
404404
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/" />
405405
</antcall>
406-
<move file="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.3-osx/esptool" tofile="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool" />
407-
<delete dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.3-osx/" />
406+
<move file="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.4-osx/esptool" tofile="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool" />
407+
<delete dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.4-osx/" />
408408

409409
</target>
410410

@@ -663,21 +663,23 @@
663663

664664
<antcall target="package-library-index-json-bundle"/>
665665

666+
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools" />
667+
666668
<antcall target="untar">
667-
<param name="archive_file" value="${staging_folder}/dist/linux64-xtensa-lx106-elf.tgz" />
668-
<param name="archive_url" value="http://download.igrr.me/linux64-xtensa-lx106-elf.tgz" />
669+
<param name="archive_file" value="${staging_folder}/dist/linux64-xtensa-lx106-elf-gb404fb9.tgz" />
670+
<param name="archive_url" value="http://download.igrr.me/linux64-xtensa-lx106-elf-gb404fb9.tgz" />
669671
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/xtensa-lx106-elf" />
670672
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/" />
671673
</antcall>
672674

673-
<antcall target="unzip">
674-
<param name="archive_file" value="${staging_folder}/esptool-0.4.3-linux64.zip" />
675-
<param name="archive_url" value="https://github.com/igrr/esptool-ck/releases/download/0.4.3/esptool-0.4.3-linux64.zip" />
676-
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.3-linux64" />
675+
<antcall target="untar">
676+
<param name="archive_file" value="${staging_folder}/esptool-0.4.4-linux64.tar.gz" />
677+
<param name="archive_url" value="https://github.com/igrr/esptool-ck/releases/download/0.4.4/esptool-0.4.4-linux64.tar.gz" />
678+
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.4-linux64" />
677679
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/" />
678680
</antcall>
679-
<move file="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.3-linux64/esptool" tofile="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool" />
680-
<delete dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.3-linux64/" />
681+
<move file="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.4-linux64/esptool" tofile="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool" />
682+
<delete dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.4-linux64/" />
681683

682684
</target>
683685

@@ -914,23 +916,25 @@
914916
</antcall>
915917

916918
<antcall target="package-library-index-json-bundle"/>
919+
920+
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools" />
917921

918922
<antcall target="untar">
919-
<param name="archive_file" value="${staging_folder}/dist/win32-xtensa-lx106-elf.tgz" />
920-
<param name="archive_url" value="http://download.igrr.me/win32-xtensa-lx106-elf.tgz" />
923+
<param name="archive_file" value="${staging_folder}/dist/win32-xtensa-lx106-elf-gb404fb9.tgz" />
924+
<param name="archive_url" value="http://download.igrr.me/win32-xtensa-lx106-elf-gb404fb9.tgz" />
921925
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/xtensa-lx106-elf" />
922926
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/" />
923927
</antcall>
924928

925929

926930
<antcall target="unzip">
927-
<param name="archive_file" value="${staging_folder}/esptool-0.4.3-win32.zip" />
928-
<param name="archive_url" value="https://github.com/igrr/esptool-ck/releases/download/0.4.3/esptool-0.4.3-win32.zip" />
929-
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.3-win32" />
931+
<param name="archive_file" value="${staging_folder}/esptool-0.4.4-win32.zip" />
932+
<param name="archive_url" value="https://github.com/igrr/esptool-ck/releases/download/0.4.4/esptool-0.4.4-win32.zip" />
933+
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.4-win32" />
930934
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/" />
931935
</antcall>
932-
<move file="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.3-win32/esptool.exe" tofile="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool.exe" />
933-
<delete dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.3-win32/" />
936+
<move file="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.4-win32/esptool.exe" tofile="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool.exe" />
937+
<delete dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.4-win32/" />
934938

935939
</target>
936940

build/build_board_manager_package.sh

+121
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
#!/bin/bash
2+
3+
ver=`git describe --tags`
4+
outdir=esp8266-$ver
5+
srcdir=../hardware/esp8266com/esp8266/
6+
mkdir -p $outdir
7+
cp -R $srcdir/* $outdir/
8+
cat $srcdir/platform.txt | \
9+
gsed 's/runtime.tools.xtensa-lx106-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-lx106-elf//g' | \
10+
gsed 's/runtime.tools.esptool.path={runtime.platform.path}\/tools//g' | \
11+
gsed 's/tools.esptool.path={runtime.platform.path}\/tools/tools.esptool.path=\{runtime.tools.esptool.path\}/g' \
12+
> $outdir/platform.txt
13+
14+
zip -r $outdir.zip $outdir
15+
sha=`shasum -a 256 $outdir.zip | cut -f 1 -d ' '`
16+
size=`/bin/ls -l $outdir.zip | awk '{print $5}'`
17+
echo Size: $size
18+
echo SHA-256: $sha
19+
20+
scp $outdir.zip dl:apps/download_files/download/
21+
22+
23+
cat << EOF > package_esp8266com_index.json
24+
{
25+
"packages": [ {
26+
"name":"esp8266",
27+
"maintainer":"ESP8266 Community",
28+
"websiteURL":"https://github.com/esp8266/Arduino",
29+
"email":"[email protected]",
30+
"help":{
31+
"online":"http://esp8266.com"
32+
},
33+
34+
"platforms": [ {
35+
"name":"esp8266",
36+
"architecture":"esp8266",
37+
"version":"$ver",
38+
"category":"ESP8266",
39+
"url":"http://arduino.esp8266.com/$outdir.zip",
40+
"archiveFileName":"$outdir.zip",
41+
"checksum":"SHA-256:$sha",
42+
"size":"$size",
43+
"help":{
44+
"online":"http://esp8266.com"
45+
},
46+
"boards":[ {
47+
"name":"Generic ESP8266 Module"
48+
}
49+
],
50+
"toolsDependencies":[ {
51+
"packager":"esp8266",
52+
"name":"esptool",
53+
"version":"0.4.4"
54+
},
55+
{
56+
"packager":"esp8266",
57+
"name":"xtensa-lx106-elf-gcc",
58+
"version":"1.20.0-26-gb404fb9"
59+
} ]
60+
} ],
61+
62+
"tools": [ {
63+
"name":"esptool",
64+
"version":"0.4.4",
65+
"systems": [
66+
{
67+
"host":"i686-mingw32",
68+
"url":"https://github.com/igrr/esptool-ck/releases/download/0.4.4/esptool-0.4.4-win32.zip",
69+
"archiveFileName":"esptool-0.4.4-win32.zip",
70+
"checksum":"SHA-256:bc52165c847b194d8f079add982eae1c4b4466784bff8c8494241de602a003b3",
71+
"size":"17262"
72+
},
73+
{
74+
"host":"x86_64-apple-darwin",
75+
"url":"https://github.com/igrr/esptool-ck/releases/download/0.4.4/esptool-0.4.4-osx.tar.gz",
76+
"archiveFileName":"esptool-0.4.4-osx.tar.gz",
77+
"checksum":"SHA-256:bb2a58c3583f9dcb0d3e7611531a0f3a29c21a4a1c442987bb29d07408824dfe",
78+
"size":"12145"
79+
},
80+
{
81+
"host":"x86_64-pc-linux-gnu",
82+
"url":"https://github.com/igrr/esptool-ck/releases/download/0.4.4/esptool-0.4.4-linux64.tar.gz",
83+
"archiveFileName":"esptool-0.4.4-linux64.tar.gz",
84+
"checksum":"SHA-256:beedf89db0bdce0bf6034232d86edebcfed0966ff1501545aca9cfbba1f92593",
85+
"size":"12513"
86+
}
87+
]
88+
},
89+
{
90+
"name":"xtensa-lx106-elf-gcc",
91+
"version":"1.20.0-26-gb404fb9",
92+
"systems": [
93+
{
94+
"host":"i686-mingw32",
95+
"url":"http://arduino.esp8266.com/win32-xtensa-lx106-elf-gb404fb9.tar.gz",
96+
"archiveFileName":"win32-xtensa-lx106-elf-gb404fb9.tar.gz",
97+
"checksum":"SHA-256:1561ec85cc58cab35cc48bfdb0d0087809f89c043112a2c36b54251a13bf781f",
98+
"size":"153807368"
99+
},
100+
{
101+
"host":"x86_64-apple-darwin",
102+
"url":"http://arduino.esp8266.com/osx-xtensa-lx106-elf-gb404fb9.tar.gz",
103+
"archiveFileName":"osx-xtensa-lx106-elf-gb404fb9.tar.gz",
104+
"checksum":"SHA-256:540be2ca32637584463a4a4d04717f6c79c7355e336b8c3578b0947218cf92b9",
105+
"size":"35189446"
106+
},
107+
{
108+
"host":"x86_64-pc-linux-gnu",
109+
"url":"http://arduino.esp8266.com/linux64-xtensa-lx106-elf-gb404fb9.tar.gz",
110+
"archiveFileName":"linux64-xtensa-lx106-elf-gb404fb9.tar.gz",
111+
"checksum":"SHA-256:46f057fbd8b320889a26167daf325038912096d09940b2a95489db92431473b7",
112+
"size":"30262903"
113+
}
114+
]
115+
} ]
116+
} ]
117+
}
118+
EOF
119+
120+
scp package_esp8266com_index.json dl:apps/download_files/download
121+

build/linux/esptool-0.4.3-linux64.zip.sha

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
65e4b3c4a26e7960536f8f2a19c5d65a13fe8025

build/macosx/esptool-0.4.3-osx.zip.sha

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
26c53e32887b0c41dab861df93a60d1688e7762b
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
07b7d398cc0ca9e863073a6558668fa0a510b8cd

build/windows/dist/win32-xtensa-lx106-elf.tgz.sha

-1
This file was deleted.

build/windows/esptool-0.4.3-win32.zip.sha

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2d1beb3fb3af8b16bca15b7cd6f61aec10cc52cb

hardware/esp8266com/esp8266/cores/esp8266/Arduino.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ void timer1_write(uint32_t ticks); //maximum ticks 8388607
112112
#undef abs
113113
#endif
114114

115-
#define min(a,b) ((a)<(b)?(a):(b))
116-
#define max(a,b) ((a)>(b)?(a):(b))
117115
#define abs(x) ((x)>0?(x):-(x))
118116
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
119117
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
@@ -215,6 +213,9 @@ void loop(void);
215213
#include "Esp.h"
216214
#include "debug.h"
217215

216+
#define min(a,b) ((a)<(b)?(a):(b))
217+
#define max(a,b) ((a)>(b)?(a):(b))
218+
218219
uint16_t makeWord(uint16_t w);
219220
uint16_t makeWord(byte h, byte l);
220221

hardware/esp8266com/esp8266/platform.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
77

88
name=ESP8266 Modules
9-
version=1.6.1
9+
version=1.6.4
1010

11-
compiler.tools.path={runtime.platform.path}/tools/
12-
compiler.path={compiler.tools.path}xtensa-lx106-elf/bin/
13-
compiler.sdk.path={compiler.tools.path}sdk/
11+
runtime.tools.xtensa-lx106-elf-gcc.path={runtime.platform.path}/tools/xtensa-lx106-elf
12+
runtime.tools.esptool.path={runtime.platform.path}/tools
1413

14+
compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/
15+
compiler.sdk.path={runtime.platform.path}/tools/sdk/
1516
compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include"
1617

1718
compiler.c.cmd=xtensa-lx106-elf-gcc
@@ -33,7 +34,6 @@ compiler.ar.cmd=xtensa-lx106-elf-ar
3334
compiler.ar.flags=cru
3435

3536
compiler.elf2hex.cmd=esptool
36-
3737
compiler.elf2hex.flags=
3838

3939
compiler.size.cmd=xtensa-lx106-elf-size
@@ -74,7 +74,7 @@ recipe.objcopy.eep.pattern=
7474
## Create hex
7575
#recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
7676

77-
recipe.objcopy.hex.pattern="{compiler.tools.path}{compiler.esptool.cmd}" -eo "{build.path}/{build.project_name}.elf" -bo "{build.path}/{build.project_name}_00000.bin" -bm {build.flash_mode} -bf {build.flash_freq} -bz {build.flash_size} -bs .text -bs .data -bs .rodata -bc -ec -eo "{build.path}/{build.project_name}.elf" -es .irom0.text "{build.path}/{build.project_name}_10000.bin" -ec
77+
recipe.objcopy.hex.pattern="{runtime.tools.esptool.path}/{compiler.esptool.cmd}" -eo "{build.path}/{build.project_name}.elf" -bo "{build.path}/{build.project_name}_00000.bin" -bm {build.flash_mode} -bf {build.flash_freq} -bz {build.flash_size} -bs .text -bs .data -bs .rodata -bc -ec -eo "{build.path}/{build.project_name}.elf" -es .irom0.text "{build.path}/{build.project_name}_10000.bin" -ec
7878

7979
## Compute size
8080
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"

0 commit comments

Comments
 (0)