Skip to content

Commit e1d580e

Browse files
Merge branch 'master' into virtual-mem
2 parents e333d50 + 34545a1 commit e1d580e

File tree

199 files changed

+8596
-15917
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+8596
-15917
lines changed

.github/workflows/pull-request.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
uses: actions/cache@v2
3131
with:
3232
path: ./tools/dist
33-
key: key-linux-toolchain
33+
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
3434
- name: Build Sketches
3535
env:
3636
TRAVIS_BUILD_DIR: ${{ github.workspace }}
@@ -62,7 +62,7 @@ jobs:
6262
uses: actions/cache@v2
6363
with:
6464
path: ./tools/dist
65-
key: key-linux-toolchain
65+
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
6666
- name: Build Sketches
6767
env:
6868
TRAVIS_BUILD_DIR: ${{ github.workspace }}
@@ -90,7 +90,7 @@ jobs:
9090
uses: actions/cache@v2
9191
with:
9292
path: ./tools/dist
93-
key: key-windows-toolchain
93+
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
9494
- name: Build Sketch
9595
env:
9696
TRAVIS_BUILD_DIR: ${{ github.workspace }}
@@ -122,7 +122,7 @@ jobs:
122122
uses: actions/cache@v2
123123
with:
124124
path: ./tools/dist
125-
key: key-mac-toolchain
125+
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
126126
- name: Build Sketch
127127
env:
128128
TRAVIS_BUILD_DIR: ${{ github.workspace }}
@@ -260,7 +260,7 @@ jobs:
260260
uses: actions/cache@v2
261261
with:
262262
path: ./tools/dist
263-
key: key-linux-toolchain
263+
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
264264
- name: Boards.txt diff
265265
env:
266266
TRAVIS_BUILD_DIR: ${{ github.workspace }}

bootloaders/eboot/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ INC += -I../../tools/sdk/include -I../../tools/sdk/uzlib/src
2323

2424
CFLAGS += -std=gnu99
2525

26-
CFLAGS += -Os -fcommon -g -Wall -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mno-text-section-literals -ffunction-sections -fdata-sections
26+
CFLAGS += -Os -fcommon -g -Wall -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mno-text-section-literals -ffunction-sections -fdata-sections -free -fipa-pta
2727

2828
CFLAGS += $(INC)
2929

bootloaders/eboot/eboot.elf

28 Bytes
Binary file not shown.

cores/esp8266/FS.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ int File::read() {
6868

6969
size_t File::read(uint8_t* buf, size_t size) {
7070
if (!_p)
71-
return -1;
71+
return 0;
7272

7373
return _p->read(buf, size);
7474
}
+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
lwIPDhcpServer-NonOS.cpp - DHCP server wrapper
3+
4+
Copyright (c) 2020 esp8266 arduino. All rights reserved.
5+
This file is part of the esp8266 core for Arduino environment.
6+
7+
This library is free software; you can redistribute it and/or
8+
modify it under the terms of the GNU Lesser General Public
9+
License as published by the Free Software Foundation; either
10+
version 2.1 of the License, or (at your option) any later version.
11+
12+
This library is distributed in the hope that it will be useful,
13+
but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
Lesser General Public License for more details.
16+
17+
You should have received a copy of the GNU Lesser General Public
18+
License along with this library; if not, write to the Free Software
19+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20+
*/
21+
22+
// STARTS/STOPS DHCP SERVER ON WIFI AP INTERFACE
23+
// these functions must exists as-is with "C" interface,
24+
// nonos-sdk calls them at boot time and later
25+
26+
#include <lwip/init.h> // LWIP_VERSION
27+
28+
#include <lwip/netif.h>
29+
#include "LwipDhcpServer.h"
30+
31+
extern netif netif_git[2];
32+
33+
// global DHCP instance for softAP interface
34+
DhcpServer dhcpSoftAP(&netif_git[SOFTAP_IF]);
35+
36+
extern "C"
37+
{
38+
39+
void dhcps_start(struct ip_info *info, netif* apnetif)
40+
{
41+
// apnetif is esp interface, replaced by lwip2's
42+
// netif_git[SOFTAP_IF] interface in constructor
43+
(void)apnetif;
44+
45+
#if 0
46+
// can't use C++ now, global ctors are not initialized yet
47+
dhcpSoftAP.begin(info);
48+
#else
49+
(void)info;
50+
// initial version: emulate nonos-sdk in DhcpServer class before
51+
// trying to change legacy behavor
52+
// `fw_has_started_softap_dhcps` will be read in DhcpServer::DhcpServer
53+
// which is called when c++ ctors are initialized, specifically
54+
// dhcpSoftAP intialized with AP interface number above.
55+
fw_has_started_softap_dhcps = 1;
56+
#endif
57+
}
58+
59+
void dhcps_stop()
60+
{
61+
dhcpSoftAP.end();
62+
}
63+
64+
} // extern "C"

0 commit comments

Comments
 (0)