Skip to content

update SDK to 2.1.0+ #3278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,20 @@ generic.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000
generic.menu.FlashSize.4M3M.build.spiffs_blocksize=8192
generic.menu.FlashSize.4M3M.upload.maximum_size=1044464

generic.menu.FlashSize.8M=8M (7M SPIFFS)
generic.menu.FlashSize.8M.build.flash_size=8M
generic.menu.FlashSize.8M.build.flash_ld=eagle.flash.8m.ld
generic.menu.FlashSize.8M.build.spiffs_start=0x100000
generic.menu.FlashSize.8M.build.spiffs_end=0x800000
generic.menu.FlashSize.8M.build.spiffs_blocksize=8192

generic.menu.FlashSize.16M=16M (15M SPIFFS)
generic.menu.FlashSize.16M.build.flash_size=16M
generic.menu.FlashSize.16M.build.flash_ld=eagle.flash.16m.ld
generic.menu.FlashSize.16M.build.spiffs_start=0x100000
generic.menu.FlashSize.16M.build.spiffs_end=0x1000000
generic.menu.FlashSize.16M.build.spiffs_blocksize=8192

generic.menu.ResetMethod.ck=ck
generic.menu.ResetMethod.ck.upload.resetmethod=ck
generic.menu.ResetMethod.nodemcu=nodemcu
Expand Down Expand Up @@ -227,19 +241,6 @@ generic.menu.DebugLevel.OTA2____.build.debug_level=-DDEBUG_ESP_OTA -DDEBUG_ESP_U
generic.menu.DebugLevel.all_____=All
generic.menu.DebugLevel.all_____.build.debug_level=-DDEBUG_ESP_CORE -DDEBUG_ESP_SSL -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM

# disabled because espressif's bootloader refuses to write above 4M
# generic.menu.FlashSize.8M=8M (7M SPIFFS)
# generic.menu.FlashSize.8M.build.flash_size=1M
# generic.menu.FlashSize.8M.build.flash_ld=eagle.flash.8m.ld
# generic.menu.FlashSize.8M.build.spiffs_start=0x100000
# generic.menu.FlashSize.8M.build.spiffs_end=0x800000
# generic.menu.FlashSize.8M.build.spiffs_blocksize=8192
# generic.menu.FlashSize.16M=16M (15M SPIFFS)
# generic.menu.FlashSize.16M.build.flash_size=1M
# generic.menu.FlashSize.16M.build.flash_ld=eagle.flash.16m.ld
# generic.menu.FlashSize.16M.build.spiffs_start=0x100000
# generic.menu.FlashSize.16M.build.spiffs_end=0x1000000
# generic.menu.FlashSize.16M.build.spiffs_blocksize=8192

##############################################################
# ESP8285 chip has built-in 1MB flash
Expand Down
4 changes: 2 additions & 2 deletions libraries/ESP8266WiFi/src/ESP8266WiFiScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,15 @@ void ESP8266WiFiScanClass::_scanDone(void* result, int status) {
int i = 0;
bss_info* head = reinterpret_cast<bss_info*>(result);

for(bss_info* it = head; it; it = it->next, ++i)
for(bss_info* it = head; it; it = STAILQ_NEXT(it, next), ++i)
;
ESP8266WiFiScanClass::_scanCount = i;
if(i == 0) {
ESP8266WiFiScanClass::_scanResult = 0;
} else {
bss_info* copied_info = new bss_info[i];
i = 0;
for(bss_info* it = head; it; it = it->next, ++i) {
for(bss_info* it = head; it; it = STAILQ_NEXT(it, next), ++i) {
memcpy(copied_info + i, it, sizeof(bss_info));
}

Expand Down
4 changes: 2 additions & 2 deletions libraries/ESP8266WiFi/src/WiFiServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ T* slist_append_tail(T* head, T* item) {
return head;
}

int8_t WiFiServer::_accept(tcp_pcb* apcb, int8_t err) {
long WiFiServer::_accept(tcp_pcb* apcb, long err) {
(void) err;
DEBUGV("WS:ac\r\n");
ClientContext* client = new ClientContext(apcb, &WiFiServer::_s_discard, this);
Expand All @@ -166,7 +166,7 @@ void WiFiServer::_discard(ClientContext* client) {
DEBUGV("WS:dis\r\n");
}

int8_t WiFiServer::_s_accept(void *arg, tcp_pcb* newpcb, int8_t err) {
long WiFiServer::_s_accept(void *arg, tcp_pcb* newpcb, long err) {
return reinterpret_cast<WiFiServer*>(arg)->_accept(newpcb, err);
}

Expand Down
4 changes: 2 additions & 2 deletions libraries/ESP8266WiFi/src/WiFiServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ class WiFiServer : public Server {
using Print::write;

protected:
int8_t _accept(tcp_pcb* newpcb, int8_t err);
long _accept(tcp_pcb* newpcb, long err);
void _discard(ClientContext* client);

static int8_t _s_accept(void *arg, tcp_pcb* newpcb, int8_t err);
static long _s_accept(void *arg, tcp_pcb* newpcb, long err);
static void _s_discard(void* server, ClientContext* ctx);
};

Expand Down
24 changes: 9 additions & 15 deletions libraries/ESP8266WiFi/src/include/ClientContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ typedef void (*discard_cb_t)(void*, ClientContext*);
extern "C" void esp_yield();
extern "C" void esp_schedule();

#ifdef LWIP_OPEN_SRC
typedef err_t recv_ret_t;
#else
typedef int32_t recv_ret_t;
#endif

#include "DataSource.h"

class ClientContext
Expand All @@ -45,7 +39,7 @@ class ClientContext
{
tcp_setprio(pcb, TCP_PRIO_MIN);
tcp_arg(pcb, this);
tcp_recv(pcb, (tcp_recv_fn) &_s_recv);
tcp_recv(pcb, &_s_recv);
tcp_sent(pcb, &_s_sent);
tcp_err(pcb, &_s_error);
tcp_poll(pcb, &_s_poll, 1);
Expand Down Expand Up @@ -78,7 +72,7 @@ class ClientContext
tcp_poll(_pcb, NULL, 0);
err = tcp_close(_pcb);
if(err != ERR_OK) {
DEBUGV(":tc err %d\r\n", err);
DEBUGV(":tc err %d\r\n", (int) err);
tcp_abort(_pcb);
err = ERR_ABRT;
}
Expand Down Expand Up @@ -126,7 +120,7 @@ class ClientContext

int connect(ip_addr_t* addr, uint16_t port)
{
err_t err = tcp_connect(_pcb, addr, port, reinterpret_cast<tcp_connected_fn>(&ClientContext::_s_connected));
err_t err = tcp_connect(_pcb, addr, port, &ClientContext::_s_connected);
if (err != ERR_OK) {
return 0;
}
Expand Down Expand Up @@ -396,7 +390,7 @@ class ClientContext
break;
}
err_t err = tcp_write(_pcb, buf, next_chunk, TCP_WRITE_FLAG_COPY);
DEBUGV(":wrc %d %d %d\r\n", next_chunk, will_send, err);
DEBUGV(":wrc %d %d %d\r\n", next_chunk, will_send, (int) err);
_datasource->release_buffer(buf, next_chunk);
if (err == ERR_OK) {
_written += next_chunk;
Expand Down Expand Up @@ -456,7 +450,7 @@ class ClientContext
}
}

recv_ret_t _recv(tcp_pcb* pcb, pbuf* pb, err_t err)
err_t _recv(tcp_pcb* pcb, pbuf* pb, err_t err)
{
(void) pcb;
(void) err;
Expand All @@ -481,7 +475,7 @@ class ClientContext
void _error(err_t err)
{
(void) err;
DEBUGV(":er %d %08x\r\n", err, (uint32_t) _datasource);
DEBUGV(":er %d 0x%08x\r\n", (int) err, (uint32_t) _datasource);
tcp_arg(_pcb, NULL);
tcp_sent(_pcb, NULL);
tcp_recv(_pcb, NULL);
Expand All @@ -490,7 +484,7 @@ class ClientContext
_notify_error();
}

int8_t _connected(void* pcb, int8_t err)
err_t _connected(struct tcp_pcb *pcb, err_t err)
{
(void) err;
assert(pcb == _pcb);
Expand All @@ -505,7 +499,7 @@ class ClientContext
return ERR_OK;
}

static recv_ret_t _s_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *pb, err_t err)
static err_t _s_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *pb, err_t err)
{
return reinterpret_cast<ClientContext*>(arg)->_recv(tpcb, pb, err);
}
Expand All @@ -525,7 +519,7 @@ class ClientContext
return reinterpret_cast<ClientContext*>(arg)->_sent(tpcb, len);
}

static int8_t _s_connected(void* arg, void* pcb, int8_t err)
static err_t _s_connected(void* arg, struct tcp_pcb *pcb, err_t err)
{
return reinterpret_cast<ClientContext*>(arg)->_connected(pcb, err);
}
Expand Down
52 changes: 26 additions & 26 deletions package/package_esp8266com_index.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
{
"packager": "esp8266",
"name": "esptool",
"version": "0.4.9"
"version": "0.4.12"
},
{
"packager": "esp8266",
Expand All @@ -100,49 +100,49 @@
"tools": [
{
"name": "esptool",
"version": "0.4.9",
"version": "0.4.12",
"systems": [
{
"host": "i686-mingw32",
"url": "https://github.com/igrr/esptool-ck/releases/download/0.4.9/esptool-0.4.9-win32.zip",
"archiveFileName": "esptool-0.4.9-win32.zip",
"checksum": "SHA-256:9c4162cedf05fcb09fd829bfb90e34ae12458365980d79525a072ff5ca44751c",
"size": "32436"
"url": "https://github.com/igrr/esptool-ck/releases/download/0.4.12/esptool-0.4.12-win32.zip",
"archiveFileName": "esptool-0.4.12-win32.zip",
"checksum": "SHA-256:f47b3bcf7c29c7a184859bbea68c9d468cf3346ca41e202ed60a0a49d987f223",
"size": "16537"
},
{
"host": "x86_64-apple-darwin",
"url": "https://github.com/igrr/esptool-ck/releases/download/0.4.9/esptool-0.4.9-osx.tar.gz",
"archiveFileName": "esptool-0.4.9-osx.tar.gz",
"checksum": "SHA-256:57938b473765723a7e6602d55973017b7719bda69bdcff4250b24fcbf7a399f5",
"size": "29310"
"url": "https://github.com/igrr/esptool-ck/releases/download/0.4.12/esptool-0.4.12-osx.tar.gz",
"archiveFileName": "esptool-0.4.12-osx.tar.gz",
"checksum": "SHA-256:8232a70611768dca49321f488e3ada29648e28aa83a6d826fcbb871aed4a9c08",
"size": "31981"
},
{
"host": "i386-apple-darwin",
"url": "https://github.com/igrr/esptool-ck/releases/download/0.4.9/esptool-0.4.9-osx.tar.gz",
"archiveFileName": "esptool-0.4.9-osx.tar.gz",
"checksum": "SHA-256:57938b473765723a7e6602d55973017b7719bda69bdcff4250b24fcbf7a399f5",
"size": "29310"
"url": "https://github.com/igrr/esptool-ck/releases/download/0.4.12/esptool-0.4.12-osx.tar.gz",
"archiveFileName": "esptool-0.4.12-osx.tar.gz",
"checksum": "SHA-256:8232a70611768dca49321f488e3ada29648e28aa83a6d826fcbb871aed4a9c08",
"size": "31981"
},
{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/igrr/esptool-ck/releases/download/0.4.9/esptool-0.4.9-linux64.tar.gz",
"archiveFileName": "esptool-0.4.9-linux64.tar.gz",
"checksum": "SHA-256:fab9d1be8a648bea6728ad5c9d18ce972508187700cf90baf1897ac9cdf4db15",
"size": "15564"
"url": "https://github.com/igrr/esptool-ck/releases/download/0.4.12/esptool-0.4.12-linux64.tar.gz",
"archiveFileName": "esptool-0.4.12-linux64.tar.gz",
"checksum": "SHA-256:f7ca7666557139bda7b2130022623a004a30d20ea47e1612b9b365783f00d8cb",
"size": "15542"
},
{
"host": "i686-pc-linux-gnu",
"url": "https://github.com/igrr/esptool-ck/releases/download/0.4.9/esptool-0.4.9-linux32.tar.gz",
"archiveFileName": "esptool-0.4.9-linux32.tar.gz",
"checksum": "SHA-256:bc4444d73d59be74608be5e1431353a0a9ae9e308e99c76a271d68a6ae145b7b",
"size": "15984"
"url": "https://github.com/igrr/esptool-ck/releases/download/0.4.12/esptool-0.4.12-linux32.tar.gz",
"archiveFileName": "esptool-0.4.12-linux32.tar.gz",
"checksum": "SHA-256:2d9970c8574908c35656e35f433082aeb7d79c1967067d7d2cff83f5ed2acbaa",
"size": "14668"
},
{
"host": "arm-linux-gnueabihf",
"url": "https://github.com/igrr/esptool-ck/releases/download/0.4.9/esptool-0.4.9-linux-armhf.tar.gz",
"archiveFileName": "esptool-0.4.9-linux-armhf.tar.gz",
"checksum": "SHA-256:d0364492599d90b8305125f8212de5be05397e4efde2fc7d0ed3676bb7018164",
"size": "13763"
"url": "https://github.com/igrr/esptool-ck/releases/download/0.4.12/esptool-0.4.12-linux-armhf.tar.gz",
"archiveFileName": "esptool-0.4.12-linux-armhf.tar.gz",
"checksum": "SHA-256:2ab4784c10020cdfc467175fe8885db702e7dd95fa5bdc428ec549257eae1a0e",
"size": "13097"
}
]
},
Expand Down
20 changes: 8 additions & 12 deletions tools/sdk/License
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
ESPRSSIF MIT License
ESPRESSIF MIT License

Copyright (c) 2015 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD>

Permission is hereby granted for use on ESPRESSIF SYSTEMS ESP8266 only, in which case, it is free of charge, to any person obtaining a copy of this software and associated documentation files (the ��Software��), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted for use on ESPRESSIF SYSTEMS ESP8266 only, in which case, it is free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ��AS IS��, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


���� MIT ����֤

��Ȩ (c) 2015 <������Ϣ�Ƽ����Ϻ������޹�˾>

������֤��Ȩ������������Ϣ�Ƽ� ESP8266 ��Ʒ��Ӧ�ÿ������ڴ�����£�������֤�����Ȩ�κλ�ø�������������ĵ���ͳ��Ϊ�������������������Ƶؾ�Ӫ�����������������Ƶ�ʹ�á����ơ��޸ġ��ϲ������淢�С�ɢ��������Ȩ������������������������Ȩ��������Ȩ����������ЩȨ����ͬʱ������������������

�����������������и����ж�����������ϵİ�Ȩ��������Ȩ������

�������������������ṩ��û���κ���ȷ�򰵺��ĵ������������������ڹ��������ԡ��ʺ�ijһ�ض���;�ͷ���Ȩ�ı�֤�����ߺͰ�Ȩ���������κ�����¾�����������������ʹ��������Ժ�ͬ��ʽ��������Ȩ��������ʽ������κ����⡢�𺦻��������θ���
乐鑫 MIT 许可证

版权 (c) 2015 <乐鑫信息科技(上海)有限公司>

该许可证授权仅限于乐鑫信息科技 ESP8266 产品的应用开发。在此情况下,该许可证免费授权任何获得该软件及其相关文档(统称为“软件”)的人无限制地经营该软件,包括无限制的使用、复制、修改、合并、出版发行、散布、再授权、及贩售软件及软件副本的权利。被授权人在享受这些权利的同时,需服从下面的条件:

在软件和软件的所有副本中都必须包含以上的版权声明和授权声明。

该软件按本来的样子提供,没有任何明确或暗含的担保,包括但不仅限于关于试销性、适合某一特定用途和非侵权的保证。作者和版权持有人在任何情况下均不就由软件或软件使用引起的以合同形式、民事侵权或其它方式提出的任何索赔、损害或其它责任负责。
Loading