1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Merge pull request #27 from esp8266/esp8266

pull master
This commit is contained in:
ficeto
2015-05-19 00:20:07 +03:00
14 changed files with 161 additions and 35 deletions

View File

@ -390,21 +390,21 @@
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools" />
<antcall target="untar">
<param name="archive_file" value="${staging_folder}/dist/osx-xtensa-lx106-elf.tgz" />
<param name="archive_url" value="http://download.igrr.me/osx-xtensa-lx106-elf.tgz" />
<param name="archive_file" value="${staging_folder}/dist/osx-xtensa-lx106-elf-gb404fb9.tgz" />
<param name="archive_url" value="http://download.igrr.me/osx-xtensa-lx106-elf-gb404fb9.tgz" />
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/xtensa-lx106-elf" />
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/" />
</antcall>
<antcall target="unzip">
<param name="archive_file" value="${staging_folder}/esptool-0.4.3-osx.zip" />
<param name="archive_url" value="https://github.com/igrr/esptool-ck/releases/download/0.4.3/esptool-0.4.3-osx.zip" />
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.3-osx" />
<antcall target="untar">
<param name="archive_file" value="${staging_folder}/esptool-0.4.4-osx.tar.gz" />
<param name="archive_url" value="https://github.com/igrr/esptool-ck/releases/download/0.4.4/esptool-0.4.4-osx.tar.gz" />
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.4-osx" />
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/" />
</antcall>
<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" />
<delete dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.3-osx/" />
<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" />
<delete dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.4-osx/" />
</target>
@ -663,21 +663,23 @@
<antcall target="package-library-index-json-bundle"/>
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools" />
<antcall target="untar">
<param name="archive_file" value="${staging_folder}/dist/linux64-xtensa-lx106-elf.tgz" />
<param name="archive_url" value="http://download.igrr.me/linux64-xtensa-lx106-elf.tgz" />
<param name="archive_file" value="${staging_folder}/dist/linux64-xtensa-lx106-elf-gb404fb9.tgz" />
<param name="archive_url" value="http://download.igrr.me/linux64-xtensa-lx106-elf-gb404fb9.tgz" />
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/xtensa-lx106-elf" />
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/" />
</antcall>
<antcall target="unzip">
<param name="archive_file" value="${staging_folder}/esptool-0.4.3-linux64.zip" />
<param name="archive_url" value="https://github.com/igrr/esptool-ck/releases/download/0.4.3/esptool-0.4.3-linux64.zip" />
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.3-linux64" />
<antcall target="untar">
<param name="archive_file" value="${staging_folder}/esptool-0.4.4-linux64.tar.gz" />
<param name="archive_url" value="https://github.com/igrr/esptool-ck/releases/download/0.4.4/esptool-0.4.4-linux64.tar.gz" />
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.4-linux64" />
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/" />
</antcall>
<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" />
<delete dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.3-linux64/" />
<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" />
<delete dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.4-linux64/" />
</target>
@ -914,23 +916,25 @@
</antcall>
<antcall target="package-library-index-json-bundle"/>
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools" />
<antcall target="untar">
<param name="archive_file" value="${staging_folder}/dist/win32-xtensa-lx106-elf.tgz" />
<param name="archive_url" value="http://download.igrr.me/win32-xtensa-lx106-elf.tgz" />
<param name="archive_file" value="${staging_folder}/dist/win32-xtensa-lx106-elf-gb404fb9.tgz" />
<param name="archive_url" value="http://download.igrr.me/win32-xtensa-lx106-elf-gb404fb9.tgz" />
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/xtensa-lx106-elf" />
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/" />
</antcall>
<antcall target="unzip">
<param name="archive_file" value="${staging_folder}/esptool-0.4.3-win32.zip" />
<param name="archive_url" value="https://github.com/igrr/esptool-ck/releases/download/0.4.3/esptool-0.4.3-win32.zip" />
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.3-win32" />
<param name="archive_file" value="${staging_folder}/esptool-0.4.4-win32.zip" />
<param name="archive_url" value="https://github.com/igrr/esptool-ck/releases/download/0.4.4/esptool-0.4.4-win32.zip" />
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.4-win32" />
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/" />
</antcall>
<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" />
<delete dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.3-win32/" />
<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" />
<delete dir="${staging_folder}/work/${staging_hardware_folder}/esp8266com/esp8266/tools/esptool-0.4.4-win32/" />
</target>

View File

@ -0,0 +1,121 @@
#!/bin/bash
ver=`git describe --tags`
outdir=esp8266-$ver
srcdir=../hardware/esp8266com/esp8266/
mkdir -p $outdir
cp -R $srcdir/* $outdir/
cat $srcdir/platform.txt | \
gsed 's/runtime.tools.xtensa-lx106-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-lx106-elf//g' | \
gsed 's/runtime.tools.esptool.path={runtime.platform.path}\/tools//g' | \
gsed 's/tools.esptool.path={runtime.platform.path}\/tools/tools.esptool.path=\{runtime.tools.esptool.path\}/g' \
> $outdir/platform.txt
zip -r $outdir.zip $outdir
sha=`shasum -a 256 $outdir.zip | cut -f 1 -d ' '`
size=`/bin/ls -l $outdir.zip | awk '{print $5}'`
echo Size: $size
echo SHA-256: $sha
scp $outdir.zip dl:apps/download_files/download/
cat << EOF > package_esp8266com_index.json
{
"packages": [ {
"name":"esp8266",
"maintainer":"ESP8266 Community",
"websiteURL":"https://github.com/esp8266/Arduino",
"email":"ivan@esp8266.com",
"help":{
"online":"http://esp8266.com"
},
"platforms": [ {
"name":"esp8266",
"architecture":"esp8266",
"version":"$ver",
"category":"ESP8266",
"url":"http://arduino.esp8266.com/$outdir.zip",
"archiveFileName":"$outdir.zip",
"checksum":"SHA-256:$sha",
"size":"$size",
"help":{
"online":"http://esp8266.com"
},
"boards":[ {
"name":"Generic ESP8266 Module"
}
],
"toolsDependencies":[ {
"packager":"esp8266",
"name":"esptool",
"version":"0.4.4"
},
{
"packager":"esp8266",
"name":"xtensa-lx106-elf-gcc",
"version":"1.20.0-26-gb404fb9"
} ]
} ],
"tools": [ {
"name":"esptool",
"version":"0.4.4",
"systems": [
{
"host":"i686-mingw32",
"url":"https://github.com/igrr/esptool-ck/releases/download/0.4.4/esptool-0.4.4-win32.zip",
"archiveFileName":"esptool-0.4.4-win32.zip",
"checksum":"SHA-256:bc52165c847b194d8f079add982eae1c4b4466784bff8c8494241de602a003b3",
"size":"17262"
},
{
"host":"x86_64-apple-darwin",
"url":"https://github.com/igrr/esptool-ck/releases/download/0.4.4/esptool-0.4.4-osx.tar.gz",
"archiveFileName":"esptool-0.4.4-osx.tar.gz",
"checksum":"SHA-256:bb2a58c3583f9dcb0d3e7611531a0f3a29c21a4a1c442987bb29d07408824dfe",
"size":"12145"
},
{
"host":"x86_64-pc-linux-gnu",
"url":"https://github.com/igrr/esptool-ck/releases/download/0.4.4/esptool-0.4.4-linux64.tar.gz",
"archiveFileName":"esptool-0.4.4-linux64.tar.gz",
"checksum":"SHA-256:beedf89db0bdce0bf6034232d86edebcfed0966ff1501545aca9cfbba1f92593",
"size":"12513"
}
]
},
{
"name":"xtensa-lx106-elf-gcc",
"version":"1.20.0-26-gb404fb9",
"systems": [
{
"host":"i686-mingw32",
"url":"http://arduino.esp8266.com/win32-xtensa-lx106-elf-gb404fb9.tar.gz",
"archiveFileName":"win32-xtensa-lx106-elf-gb404fb9.tar.gz",
"checksum":"SHA-256:1561ec85cc58cab35cc48bfdb0d0087809f89c043112a2c36b54251a13bf781f",
"size":"153807368"
},
{
"host":"x86_64-apple-darwin",
"url":"http://arduino.esp8266.com/osx-xtensa-lx106-elf-gb404fb9.tar.gz",
"archiveFileName":"osx-xtensa-lx106-elf-gb404fb9.tar.gz",
"checksum":"SHA-256:540be2ca32637584463a4a4d04717f6c79c7355e336b8c3578b0947218cf92b9",
"size":"35189446"
},
{
"host":"x86_64-pc-linux-gnu",
"url":"http://arduino.esp8266.com/linux64-xtensa-lx106-elf-gb404fb9.tar.gz",
"archiveFileName":"linux64-xtensa-lx106-elf-gb404fb9.tar.gz",
"checksum":"SHA-256:46f057fbd8b320889a26167daf325038912096d09940b2a95489db92431473b7",
"size":"30262903"
}
]
} ]
} ]
}
EOF
scp package_esp8266com_index.json dl:apps/download_files/download

View File

@ -1 +0,0 @@
f183d52557a50dd362fcb4d45ffd6612b328e465

View File

@ -0,0 +1 @@
65e4b3c4a26e7960536f8f2a19c5d65a13fe8025

View File

@ -1 +0,0 @@
544070e40abd3a81cad554020be86157674f9794

View File

@ -0,0 +1 @@
26c53e32887b0c41dab861df93a60d1688e7762b

View File

@ -0,0 +1 @@
07b7d398cc0ca9e863073a6558668fa0a510b8cd

View File

@ -1 +0,0 @@
7ec8f2ffdf65dc51262fccfa7a68d9ae885c06c2

View File

@ -1 +0,0 @@
10eb2292bb20accceb7389ab91fa40afd5b1fb70

View File

@ -0,0 +1 @@
2d1beb3fb3af8b16bca15b7cd6f61aec10cc52cb

View File

@ -112,8 +112,6 @@ void timer1_write(uint32_t ticks); //maximum ticks 8388607
#undef abs
#endif
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#define abs(x) ((x)>0?(x):-(x))
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
@ -215,6 +213,9 @@ void loop(void);
#include "Esp.h"
#include "debug.h"
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
uint16_t makeWord(uint16_t w);
uint16_t makeWord(byte h, byte l);

View File

@ -6,12 +6,13 @@
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
name=ESP8266 Modules
version=1.6.1
version=1.6.4
compiler.tools.path={runtime.platform.path}/tools/
compiler.path={compiler.tools.path}xtensa-lx106-elf/bin/
compiler.sdk.path={compiler.tools.path}sdk/
runtime.tools.xtensa-lx106-elf-gcc.path={runtime.platform.path}/tools/xtensa-lx106-elf
runtime.tools.esptool.path={runtime.platform.path}/tools
compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/
compiler.sdk.path={runtime.platform.path}/tools/sdk/
compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include"
compiler.c.cmd=xtensa-lx106-elf-gcc
@ -33,7 +34,6 @@ compiler.ar.cmd=xtensa-lx106-elf-ar
compiler.ar.flags=cru
compiler.elf2hex.cmd=esptool
compiler.elf2hex.flags=
compiler.size.cmd=xtensa-lx106-elf-size
@ -74,7 +74,7 @@ recipe.objcopy.eep.pattern=
## Create hex
#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"
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
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
## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"