8000 Merge branch 'master' into ethernet · esp8266/Arduino@21694be · GitHub
[go: up one dir, main page]

Skip to content

Commit 21694be

Browse files
committed
Merge branch 'master' into ethernet
2 parents bd8b32a + 40f5a99 commit 21694be

File tree

15 files changed

+67
-59
lines changed

15 files changed

+67
-59
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Arduino core for ESP8266 WiFi chip
33

44
# Quick links
55

6-
- [Latest release documentation](https://arduino-esp8266.readthedocs.io/en/2.6.1/)
6+
- [Latest release documentation](https://arduino-esp8266.readthedocs.io/en/2.6.2/)
77
- [Current "git version" documentation](https://arduino-esp8266.readthedocs.io/en/latest/)
88
- [Install git version](https://arduino-esp8266.readthedocs.io/en/latest/installing.html#using-git-version) ([sources](doc/installing.rst#using-git-version))
99

@@ -36,7 +36,7 @@ Starting with 1.6.4, Arduino allows installation of third-party platform package
3636
#### Latest release [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/)
3737
Boards manager link: `https://arduino.esp8266.com/stable/package_esp8266com_index.json`
3838

39-
Documentation: [https://arduino-esp8266.readthedocs.io/en/2.6.1/](https://arduino-esp8266.readthedocs.io/en/2.6.1/)
39+
Documentation: [https://arduino-esp8266.readthedocs.io/en/2.6.2/](https://arduino-esp8266.readthedocs.io/en/2.6.2/)
4040

4141
### Using git version
4242
[![Linux build status](https://travis-ci.org/esp8266/Arduino.svg)](https://travis-ci.org/esp8266/Arduino)

boards.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,12 +372,12 @@ generic.menu.led.15=15
372372
generic.menu.led.15.build.led=-DLED_BUILTIN=15
373373
generic.menu.led.16=16
374374
generic.menu.led.16.build.led=-DLED_BUILTIN=16
375-
generic.menu.sdk.nonosdk_191024=nonos-sdk 2.2.1+111 (191024)
376-
generic.menu.sdk.nonosdk_191024.build.sdk=NONOSDK22x_191024
377-
generic.menu.sdk.nonosdk_191105=nonos-sdk 2.2.1+113 (191105)
378-
generic.menu.sdk.nonosdk_191105.build.sdk=NONOSDK22x_191105
379375
generic.menu.sdk.nonosdk_190703=nonos-sdk 2.2.1+100 (190703)
380376
generic.menu.sdk.nonosdk_190703.build.sdk=NONOSDK22x_190703
377+
generic.menu.sdk.nonosdk_191105=nonos-sdk 2.2.1+113 (191105)
378+
generic.menu.sdk.nonosdk_191105.build.sdk=NONOSDK22x_191105
379+
generic.menu.sdk.nonosdk_191024=nonos-sdk 2.2.1+111 (191024)
380+
generic.menu.sdk.nonosdk_191024.build.sdk=NONOSDK22x_191024
381381
generic.menu.sdk.nonosdk221=nonos-sdk 2.2.1 (legacy)
6D40
382382
generic.menu.sdk.nonosdk221.build.sdk=NONOSDK221
383383
generic.menu.sdk.nonosdk3v0=nonos-sdk pre-3 (180626 known issues)

cores/esp8266/HardwareSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ unsigned long HardwareSerial::testBaudrate()
133133
unsigned long HardwareSerial::detectBaudrate(time_t timeoutMillis)
134134
{
135135
esp8266::polledTimeout::oneShotFastMs timeOut(timeoutMillis);
136-
unsigned long detectedBaudrate;
136+
unsigned long detectedBaudrate = 0;
137137
while (!timeOut) {
138138
if ((detectedBaudrate = testBaudrate())) {
139139
break;

cores/esp8266/TZ.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
// autogenerated from https://raw.githubusercontent.com/nayarsystems/posix_tz_db/master/zones.csv
33
// by script <esp8266 arduino core>/tools/TZupdate.sh
4-
// Thu Nov 14 08:41:55 UTC 2019
4+
// Wed Nov 27 23:41:03 UTC 2019
55
//
66
// This database is autogenerated from IANA timezone database
77
// https://www.iana.org/time-zones

doc/filesystem.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,11 @@ directory into ESP8266 flash file system.
190190

191191
**Warning**: Due to the move from the obsolete esptool-ck.exe to the
192192
supported esptool.py upload tool, upgraders from pre 2.5.1 will need to
193-
update the ESP8266FS tool referenced below to 0.4.0 or later. Prior versions
193+
update the ESP8266FS tool referenced below to 0.5.0 or later. Prior versions
194194
will fail with a "esptool not found" error because they don't know how to
195195
use esptool.py.
196196

197-
- Download the tool: https://github.com/esp8266/arduino-esp8266fs-plugin/releases/download/0.4.0/ESP8266FS-0.4.0.zip
197+
- Download the tool: https://github.com/esp8266/arduino-esp8266fs-plugin/releases/download/0.5.0/ESP8266FS-0.5.0.zip
198198
- In your Arduino sketchbook directory, create ``tools`` directory if
199199
it doesn't exist yet.
200200
- Unpack the tool into ``tools`` directory (the path will look like
@@ -214,7 +214,7 @@ use esptool.py.
214214

215215
*ESP8266LittleFS* is the equivalent tool for LittleFS.
216216

217-
- Download the tool: https://github.com/earlephilhower/arduino-esp8266littlefs-plugin/releases
217+
- Download the 2.6.0 or later version of the tool: https://github.com/earlephilhower/arduino-esp8266littlefs-plugin/releases
218218
- Install as above
219219
- To upload a LittleFS filesystem use Tools > ESP8266 LittleFS Data Upload
220220

libraries/ArduinoOTA/ArduinoOTA.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ void ArduinoOTAClass::_runUpdate() {
303303
client.setNoDelay(true);
304304

305305
uint32_t written, total = 0;
306-
while (!Update.isFinished() && client.connected()) {
306+
while (!Update.isFinished() && (client.connected() || client.available())) {
307307
int waited = 1000;
308308
while (!client.available() && waited--)
309309
delay(1);

libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -677,9 +677,20 @@ int HTTPClient::sendRequest(const char * type, const uint8_t * payload, size_t s
677677
}
678678

679679
// send Payload if needed
680-
if(payload && size > 0) {
681-
if(_client->write(&payload[0], size) != size) {
682-
return returnError(HTTPC_ERROR_SEND_PAYLOAD_FAILED);
680+
if (payload && size > 0) {
681+
size_t bytesWritten = 0;
682+
const uint8_t *p = payload;
683+
while (bytesWritten < size) {
684+
int written;
685+
int towrite = std::min((int)size, (int)HTTP_TCP_BUFFER_SIZE);
686+
written = _client->write(p + bytesWritten, towrite);
687+
if (written < 0) {
688+
return returnError(HTTPC_ERROR_SEND_PAYLOAD_FAILED);
689+
} else if (written == 0) {
690+
return returnError(HTTPC_ERROR_CONNECTION_LOST);
691+
}
692+
bytesWritten += written;
693+
size -= written;
683694
}
684695
}
685696

libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ void ESP8266WebServerTemplate<ServerType>::handleClient() {
319319
bool keepCurrentClient = false;
320320
bool callYield = false;
321321

322-
if (_currentClient.connected()) {
322+
if (_currentClient.connected() || _currentClient.available()) {
323323
switch (_currentStatus) {
324324
case HC_NONE:
325325
// No-op to avoid C++ compiler warning

package/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ The following points assume work in a direct clone of the repository, and not in
109109
110110
2. Make a PR with the following, wait for Travis CI, and merge.
111111
112-
* platform.txt: update `version` to the release E.g. `3.0.0`,
112+
* platform.txt and package.json: update `version` to the release E.g. `3.0.0`,
113113
114114
* `cores/esp8266/TZ.h`: import the latest database with the following shell command:\
115115
`$ cd tools; sh TZupdate.sh`.
@@ -150,7 +150,7 @@ The following points assume work in a direct clone of the repository, and not in
150150
151151
11. Create a commit to the master branch, updating:
152152
153-
* The version in platform.txt file. This should correspond to the version of the *next* milestone, plus `-dev` suffix. E.g. `3.1.0-dev`.
153+
* The version in platform.txt and package.json files. This should correspond to the version of the *next* milestone, plus `-dev` suffix. E.g. `3.1.0-dev`.
154154
155155
* In main README.md:
156156

platform.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ build.led=
4242

4343
# default SDK for all boards
4444
# (generic board overrides this variable)
45-
#build.sdk=NONOSDK22x_190703
46-
build.sdk=NONOSDK22x_191024
45+
build.sdk=NONOSDK22x_190703
46+
#build.sdk=NONOSDK22x_191024
4747
#build.sdk=NONOSDK22x_191105
4848

4949
compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/

tests/host/common/MockEsp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ uint32_t EspClass::getFreeSketchSpace()
120120

121121
uint8_t EspClass::getCpuFreqMHz()
122122
{
123-
return 160;
123+
return F_CPU / 1000000;
124124
}
125125

126126
const char *EspClass::getSdkVersion()

tests/host/common/mock.h

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,29 @@ typedef uint32_t uint32;
6161

6262
//
6363

64+
#define ARDUINO 267
65+
#define ESP8266 1
66+
#define A0 0
67+
#define LED_BUILTIN 0
68+
#define F_CPU 80000000
69+
#define LWIP_OPEN_SRC
70+
#define TCP_MSS 536
71+
#define LWIP_FEATURES 1
72+
73+
//
74+
75+
#define D0 0
76+
#define D1 1
77+
#define D2 3
78+
#define D3 3
79+
#define D4 4
80+
#define D5 5
81+
#define D6 6
82+
#define D7 7
83+
#define D8 8
84+
85+
//
86+
6487
#include <Arduino.h>
6588

6689
//
@@ -143,29 +166,6 @@ void mock_stop_littlefs ();
143166

144167
//
145168

146-
#define ARDUINO 267
147-
#define ESP8266 1
148-
#define A0 0
149-
#define LED_BUILTIN 0
150-
#define F_CPU 80000000
151-
#define LWIP_OPEN_SRC
152-
#define TCP_MSS 536
153-
#define LWIP_FEATURES 1
154-
155-
//
156-
157-
#define D0 0
158-
#define D1 1
159-
#define D2 3
160-
#define D3 3
161-
#define D4 4
162-
#define D5 5
163-
#define D6 6
164-
#define D7 7
165-
#define D8 8
166-
167-
//
168-
169169
#include <common/esp8266_peri.h>
170170

171171
//

tools/boards.txt.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,12 +1457,12 @@ def led (name, default, ledList):
14571457

14581458
def sdk ():
14591459
return { 'sdk': collections.OrderedDict([
1460-
('.menu.sdk.nonosdk_191024', 'nonos-sdk 2.2.1+111 (191024)'),
1461-
('.menu.sdk.nonosdk_191024.build.sdk', 'NONOSDK22x_191024'),
1462-
('.menu.sdk.nonosdk_191105', 'nonos-sdk 2.2.1+113 (191105)'),
1463-
('.menu.sdk.nonosdk_191105.build.sdk', 'NONOSDK22x_191105'),
14641460
('.menu.sdk.nonosdk_190703', 'nonos-sdk 2.2.1+100 (190703)'),
14651461
('.menu.sdk.nonosdk_190703.build.sdk', 'NONOSDK22x_190703'),
1462+
('.menu.sdk.nonosdk_191105', 'nonos-sdk 2.2.1+113 (191105)'),
1463+
('.menu.sdk.nonosdk_191105.build.sdk', 'NONOSDK22x_191105'),
1464+
('.menu.sdk.nonosdk_191024', 'nonos-sdk 2.2.1+111 (191024)'),
1465+
('.menu.sdk.nonosdk_191024.build.sdk', 'NONOSDK22x_191024'),
14661466
# ('.menu.sdk.nonosdk_190313', 'nonos-sdk 2.2.1+61 (190313 testing)'),
14671467
# ('.menu.sdk.nonosdk_190313.build.sdk', 'NONOSDK22x_190313'),
14681468
('.menu.sdk.nonosdk221', 'nonos-sdk 2.2.1 (legacy)'),

tools/platformio-build.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,20 +175,20 @@ def scons_patched_match_splitext(path, suffixes=None):
175175
CPPDEFINES=[("NONOSDK22x_190313", 1)],
176176
LIBPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lib", "NONOSDK22x_190313")]
177177
)
178-
elif "PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703" in flatten_cppdefines:
178+
elif "PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191024" in flatten_cppdefines:
179179
env.Append(
180-
CPPDEFINES=[("NONOSDK22x_190703", 1)],
181-
LIBPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lib", "NONOSDK22x_190703")]
180+
CPPDEFINES=[("NONOSDK22x_191024", 1)],
181+
LIBPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lib", "NONOSDK22x_191024")]
182182
)
183183
elif "PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191105" in flatten_cppdefines:
184184
env.Append(
185185
CPPDEFINES=[("NONOSDK22x_191105", 1)],
186186
LIBPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lib", "NONOSDK22x_191105")]
187187
)
188-
else: #(default) if "PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191024" in flatten_cppdefines:
188+
else: #(default) if "PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703" in flatten_cppdefines:
189189
env.Append(
190-
CPPDEFINES=[("NONOSDK22x_191024", 1)],
191-
LIBPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lib", "NONOSDK22x_191024")]
190+
CPPDEFINES=[("NONOSDK22x_190703", 1)],
191+
LIBPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lib", "NONOSDK22x_190703")]
192192
)
193193

194194
#

tools/upload.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Wrapper for Arduino core / others that can call esptool.py possibly multiple times
44
# Adds pyserial to sys.path automatically based on the path of the current file
55

6-
# First parameter is pyserial path, second is esptool path, then a series of command arguments separated with --end
7-
# i.e. upload.py tools/pyserial tools/esptool erase_flash --end write_flash file 0x0 --end
6+
# First parameter is pyserial path, second is esptool path, then a series of command arguments
7+
# i.e. upload.py tools/pyserial tools/esptool write_flash file 0x0
88

99
import sys
1010
import os
@@ -42,9 +42,6 @@
4242
elif thisarg == 'erase_region':
4343
erase_addr = sys.argv.pop(0)
4444
erase_len = sys.argv.pop(0)
45-
elif thisarg == '--end':
46-
# Backwards compatibility with fs upload tools, eat --end
47-
pass
4845
elif thisarg == 'write_flash':
4946
write_addr = sys.argv.pop(0)
5047
binary = sys.argv.pop(0)

0 commit comments

Comments
 (0)
0