From b5f873ecc3cb054c7bf96011c91dbac007ada6d5 Mon Sep 17 00:00:00 2001 From: Develo Date: Fri, 8 Nov 2019 22:17:53 -0300 Subject: [PATCH 01/12] Update platform to 2.7.0-dev, bump Readme to 2.6.0 (#6734) --- README.md | 4 ++-- platform.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 22a12463a3..acd83e745c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Arduino core for ESP8266 WiFi chip # Quick links -- [Latest release documentation](https://arduino-esp8266.readthedocs.io/en/2.5.2/) +- [Latest release documentation](https://arduino-esp8266.readthedocs.io/en/2.6.0/) - [Current "git version" documentation](https://arduino-esp8266.readthedocs.io/en/latest/) - [Install git version](https://arduino-esp8266.readthedocs.io/en/latest/installing.html#using-git-version) ([sources](doc/installing.rst#using-git-version)) @@ -36,7 +36,7 @@ Starting with 1.6.4, Arduino allows installation of third-party platform package #### Latest release [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/) Boards manager link: `https://arduino.esp8266.com/stable/package_esp8266com_index.json` -Documentation: [https://arduino-esp8266.readthedocs.io/en/2.5.2/](https://arduino-esp8266.readthedocs.io/en/2.5.2/) +Documentation: [https://arduino-esp8266.readthedocs.io/en/2.6.0/](https://arduino-esp8266.readthedocs.io/en/2.6.0/) ### Using git version [![Linux build status](https://travis-ci.org/esp8266/Arduino.svg)](https://travis-ci.org/esp8266/Arduino) diff --git a/platform.txt b/platform.txt index 18200bb679..13da729e6f 100644 --- a/platform.txt +++ b/platform.txt @@ -5,8 +5,8 @@ # For more info: # https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification -name=ESP8266 Boards (2.6.0) -version=2.6.0 +name=ESP8266 Boards (2.7.0-dev) +version=2.7.0-dev # These will be removed by the packager script when doing a JSON release runtime.tools.xtensa-lx106-elf-gcc.path={runtime.platform.path}/tools/xtensa-lx106-elf From 6626b2fb079b8aede85d57481f1140d589e4b03a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ch=E1=BA=BF=20Ti=E1=BB=87p=20Ch=C3=A2n=20Khoa?= Date: Sat, 9 Nov 2019 14:55:18 +0700 Subject: [PATCH 02/12] add docs: how to get POST body in ESP8266WebSever (#6736) --- libraries/ESP8266WebServer/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/ESP8266WebServer/README.rst b/libraries/ESP8266WebServer/README.rst index 00a3813a84..0dcf68b516 100644 --- a/libraries/ESP8266WebServer/README.rst +++ b/libraries/ESP8266WebServer/README.rst @@ -96,7 +96,7 @@ Getting information about request arguments int args(); bool hasArg(); -``arg`` - get request argument value +``arg`` - get request argument value, use ``arg("plain")`` to get POST body ``argName`` - get request argument name From 2c2468f96269d0dff6a3f99af62a88636fcc0f6b Mon Sep 17 00:00:00 2001 From: Peter Date: Sun, 10 Nov 2019 09:41:26 +1000 Subject: [PATCH 03/12] Add `ipv4_addr_t` for espconn/LwIP1.4 compat (#6740) `espconnn.h` references ipv4_addr_t, so it seems appropriate it be defined here also. --- cores/esp8266/IPAddress.h | 1 + 1 file changed, 1 insertion(+) diff --git a/cores/esp8266/IPAddress.h b/cores/esp8266/IPAddress.h index bf5ef1010d..cdd4b2499f 100644 --- a/cores/esp8266/IPAddress.h +++ b/cores/esp8266/IPAddress.h @@ -32,6 +32,7 @@ #define LWIP_IPV6_NUM_ADDRESSES 0 #define ip_2_ip4(x) (x) #define ipv4_addr ip_addr +#define ipv4_addr_t ip_addr_t #define IP_IS_V4_VAL(x) (1) #define IP_SET_TYPE_VAL(x,y) do { (void)0; } while (0) #define IP_ANY_TYPE (&ip_addr_any) From adda7da485aff450e4102ac1cbfd66219bf8505c Mon Sep 17 00:00:00 2001 From: Develo Date: Sat, 9 Nov 2019 23:53:38 -0300 Subject: [PATCH 04/12] Mention erasing arduino15 contents before installing git (#6741) --- doc/installing.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/installing.rst b/doc/installing.rst index a83d4161f9..ca9e3f449e 100644 --- a/doc/installing.rst +++ b/doc/installing.rst @@ -53,7 +53,8 @@ Instructions - Windows 10 ~~~~~~~~~~~~~~~~~~~~~~~~~ - First, make sure you don't already have an ESP8266 core version installed using the Board Manager (see above). If you do, uninstall it from the - Board Manager before proceeding. + Board Manager before proceeding. It is also advisable to erase the Arduino15 + contents. - Install git for Windows (if not already; see https://git-scm.com/download/win) @@ -136,7 +137,8 @@ Instructions - Other OS - First, make sure you don't already have an ESP8266 core version installed using the Board Manager (see above). If you do, uninstall it from the - Board Manager before proceeding. + Board Manager before proceeding. It is also advisable to erase the .arduino15 (Linux) + or Arduino15 (MacOS) contents. - Open the console and go to Arduino directory. This can be either your *sketchbook* directory (usually ``/Arduino``), or the From dde76d1b5da4a99c109a8a4a29dae693fef316b4 Mon Sep 17 00:00:00 2001 From: Develo Date: Sun, 10 Nov 2019 02:01:02 -0300 Subject: [PATCH 05/12] Puts to rest the confusion about the builtin leds for nodemcu boards (#6743) Given that most nodemcu boards are based on the ESP12 boards, the definition of the builtin led is now changed to 2. In addition, for those nodemcu boards that have an additional LED on the board connected to gpio16, an additional define is added called LED_BUILTIN_AUX. --- variants/nodemcu/pins_arduino.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/variants/nodemcu/pins_arduino.h b/variants/nodemcu/pins_arduino.h index ceb30691cb..443e23e0f0 100644 --- a/variants/nodemcu/pins_arduino.h +++ b/variants/nodemcu/pins_arduino.h @@ -32,7 +32,8 @@ static const uint8_t SDA = PIN_WIRE_SDA; static const uint8_t SCL = PIN_WIRE_SCL; -#define LED_BUILTIN 16 +#define LED_BUILTIN 2 +#define LED_BUILTIN_AUX 16 static const uint8_t D0 = 16; static const uint8_t D1 = 5; From 43e0554b9c29d37996b9714778d08142b5599053 Mon Sep 17 00:00:00 2001 From: Develo Date: Sun, 10 Nov 2019 03:52:40 -0300 Subject: [PATCH 06/12] Add some useful links (#6744) Fixes #1360 --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index acd83e745c..ed7864956c 100644 --- a/README.md +++ b/README.md @@ -123,3 +123,13 @@ ESP8266 core files are licensed under LGPL. [BearSSL](https://bearssl.org) library written by Thomas Pornin, built from https://github.com/earlephilhower/bearssl-esp8266, is used in this project. It is distributed under the [MIT License](https://bearssl.org/#legal-details). [LittleFS](https://github.com/ARMmbed/littlefs) library written by ARM Limited and released under the [BSD 3-clause license](https://github.com/ARMmbed/littlefs/blob/master/LICENSE.md). + +### Other useful links ### + +[Toolchain repo](https://github.com/earlephilhower/esp-quick-toolchain) + +[Lwip link layer repo](https://github.com/d-a-v/esp82xx-nonos-linklayer) + +[SoftwareSerial repo](https://github.com/plerup/espsoftwareserial) + +[Serial Monitor Arduino IDE plugin](https://github.com/mytrain/arduino-esp8266-serial-plugin) Original discussion [here](https://github.com/esp8266/Arduino/issues/1360), quick download [there](http://mytrain.fr/cms//images/mytrain/private/ESP8266SM.v3.zip). From 739bcd3fd577e3d35d8356d68756274f7251cca0 Mon Sep 17 00:00:00 2001 From: "Dirk O. Kaar" <19971886+dok-net@users.noreply.github.com> Date: Sun, 10 Nov 2019 10:48:12 +0100 Subject: [PATCH 07/12] Updated EspSoftwareSerial brings backward compatibility for ctor/begin() pair (only for the common cases with complete default argument use) (#6746) --- .../examples/WiFiTelnetToSerial/WiFiTelnetToSerial.ino | 4 ++-- libraries/SoftwareSerial | 2 +- libraries/esp8266/examples/SerialStress/SerialStress.ino | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/ESP8266WiFi/examples/WiFiTelnetToSerial/WiFiTelnetToSerial.ino b/libraries/ESP8266WiFi/examples/WiFiTelnetToSerial/WiFiTelnetToSerial.ino index 5ba217b233..9102af12d8 100644 --- a/libraries/ESP8266WiFi/examples/WiFiTelnetToSerial/WiFiTelnetToSerial.ino +++ b/libraries/ESP8266WiFi/examples/WiFiTelnetToSerial/WiFiTelnetToSerial.ino @@ -85,8 +85,8 @@ void setup() { Serial.swap(); // Hardware serial is now on RX:GPIO13 TX:GPIO15 // use SoftwareSerial on regular RX(3)/TX(1) for logging - logger = new SoftwareSerial(); - logger->begin(BAUD_LOGGER, 3, 1); + logger = new SoftwareSerial(3, 1); + logger->begin(BAUD_LOGGER); logger->enableIntTx(false); logger->println("\n\nUsing SoftwareSerial for logging"); #else diff --git a/libraries/SoftwareSerial b/libraries/SoftwareSerial index 1a1472340b..9bb7388ca9 160000 --- a/libraries/SoftwareSerial +++ b/libraries/SoftwareSerial @@ -1 +1 @@ -Subproject commit 1a1472340b73d17495710f489de81e7b53fb5a21 +Subproject commit 9bb7388ca9468a8325a88b7de1f2d39f2786e03b diff --git a/libraries/esp8266/examples/SerialStress/SerialStress.ino b/libraries/esp8266/examples/SerialStress/SerialStress.ino index 5500b10a62..1412abd2be 100644 --- a/libraries/esp8266/examples/SerialStress/SerialStress.ino +++ b/libraries/esp8266/examples/SerialStress/SerialStress.ino @@ -72,8 +72,8 @@ void setup() { // using HardwareSerial0 pins, // so we can still log to the regular usbserial chips - SoftwareSerial* ss = new SoftwareSerial; - ss->begin(SSBAUD, 3, 1); + SoftwareSerial* ss = new SoftwareSerial(3, 1); + ss->begin(SSBAUD); ss->enableIntTx(false); logger = ss; logger->println(); From 4e5bf118c1e6c15b5a3109b37765c5e88c9727e6 Mon Sep 17 00:00:00 2001 From: david gauchard Date: Sun, 10 Nov 2019 18:22:21 +0100 Subject: [PATCH 08/12] release script: remove makecorever.py call in released version (#6747) * (fix) remove makecorever.py call in released version * fix regexp --- package/build_boards_manager_package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/build_boards_manager_package.sh b/package/build_boards_manager_package.sh index f5ffff447f..ff63547b97 100755 --- a/package/build_boards_manager_package.sh +++ b/package/build_boards_manager_package.sh @@ -94,7 +94,7 @@ $SED 's/^tools.esptool.network_cmd=.*//g' | \ $SED 's/^#tools.esptool.cmd=/tools.esptool.cmd=/g' | \ $SED 's/^#tools.esptool.network_cmd=/tools.esptool.network_cmd=/g' | \ $SED 's/tools.mkspiffs.path={runtime.platform.path}\/tools\/mkspiffs/tools.mkspiffs.path=\{runtime.tools.mkspiffs.path\}/g' |\ -$SED 's/recipe.hooks.core.prebuild.pattern.*//g' |\ +$SED 's/recipe.hooks.*makecorever.*//g' |\ $SED "s/version=.*/version=$ver/g" |\ $SED -E "s/name=([a-zA-Z0-9\ -]+).*/name=\1($ver)/g"\ > $outdir/platform.txt From bc60e97489fee09002156b33421c9df1e3b4fd95 Mon Sep 17 00:00:00 2001 From: david gauchard Date: Sun, 10 Nov 2019 22:07:51 +0100 Subject: [PATCH 09/12] board NodeMCUv1 menu: led selection (2, 16) (#6748) --- boards.txt | 4 ++++ tools/boards.txt.py | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/boards.txt b/boards.txt index f19cc72b6b..e873cdb57c 100644 --- a/boards.txt +++ b/boards.txt @@ -2610,6 +2610,10 @@ nodemcuv2.menu.eesz.4M.build.flash_ld=eagle.flash.4m.ld nodemcuv2.menu.eesz.4M.build.spiffs_pagesize=256 nodemcuv2.menu.eesz.4M.upload.maximum_size=1044464 nodemcuv2.menu.eesz.4M.build.rfcal_addr=0x3FC000 +nodemcuv2.menu.led.2=2 +nodemcuv2.menu.led.2.build.led=-DLED_BUILTIN=2 +nodemcuv2.menu.led.16=16 +nodemcuv2.menu.led.16.build.led=-DLED_BUILTIN=16 nodemcuv2.menu.ip.lm2f=v2 Lower Memory nodemcuv2.menu.ip.lm2f.build.lwip_include=lwip2/include nodemcuv2.menu.ip.lm2f.build.lwip_lib=-llwip2-536-feat diff --git a/tools/boards.txt.py b/tools/boards.txt.py index 53964bbc04..a40c5f885c 100755 --- a/tools/boards.txt.py +++ b/tools/boards.txt.py @@ -42,6 +42,7 @@ requiredboards = [ 'generic', 'esp8285' ] +################################################################ # serial upload speed order in menu # default is 115 for every board unless specified with 'serial' in board # or by user command line @@ -57,6 +58,7 @@ ( '3000', [ 's3000','s57', 's115', 's230', 's256', 's460', 's512', 's921' ]), ]) +################################################################ # boards list boards = collections.OrderedDict([ @@ -467,6 +469,7 @@ 'flashmode_dio', 'flashfreq_40', '4M', + 'led216', ], 'desc': [ 'This module is sold under many names for around $6.50 on AliExpress and it\'s one of the cheapest, fully integrated ESP8266 solutions.', '', @@ -1435,19 +1438,19 @@ def all_flash_map (): ################################################################ # builtin led -def led (default,max): +def led (name, default, ledList): led = collections.OrderedDict([ ('.menu.led.' + str(default), str(default)), ('.menu.led.' + str(default) + '.build.led', '-DLED_BUILTIN=' + str(default)), ]); - for i in range(0,max+1): # Make range incluside of max (16), since there are really 16 GPIOS not 15 + for i in ledList: # Make range incluside of max (16), since there are really 16 GPIOS not 15 if not i == default: led.update( collections.OrderedDict([ ('.menu.led.' + str(i), str(i)), ('.menu.led.' + str(i) + '.build.led', '-DLED_BUILTIN=' + str(i)), ])) - return { 'led': led } + return { name: led } ################################################################ # sdk selection @@ -1495,7 +1498,8 @@ def all_boards (): macros.update(all_flash_map()) macros.update(all_debug()) - macros.update(led(led_default, led_max)) + macros.update(led('led', led_default, range(0,led_max+1))) + macros.update(led('led216', 2, { 16 })) macros.update(sdk()) if boardfilteropt or excludeboards: From 8222acedafe48779716e76accfd762184e422fbc Mon Sep 17 00:00:00 2001 From: "Dirk O. Kaar" <19971886+dok-net@users.noreply.github.com> Date: Tue, 12 Nov 2019 15:57:11 +0100 Subject: [PATCH 10/12] EspSoftwareSerial release 6.1.1, "9bit" support (#6761) * EspSoftwareSerial release 6.1.0: New feature, a.k.a. "9bit": Supports parity bit on TX and RX and 2 stop bits. * Fix for local relative #include --- libraries/SoftwareSerial | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/SoftwareSerial b/libraries/SoftwareSerial index 9bb7388ca9..38e3f1a3c0 160000 --- a/libraries/SoftwareSerial +++ b/libraries/SoftwareSerial @@ -1 +1 @@ -Subproject commit 9bb7388ca9468a8325a88b7de1f2d39f2786e03b +Subproject commit 38e3f1a3c0ce8a4c3e6cda4a9698968a6f3d96c4 From 41d99ad48a833723e65183431ae85993f6cd7d2e Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Tue, 12 Nov 2019 18:47:26 +0100 Subject: [PATCH 11/12] WString explicit converters to reduce Flash size (#6759) * WString explicit converters to reduce Flash size * Fix add return value for start/endsWith * Adding const to startsWith() and endsWith() --- cores/esp8266/WString.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/cores/esp8266/WString.h b/cores/esp8266/WString.h index 8c970abf14..3f026f2f75 100644 --- a/cores/esp8266/WString.h +++ b/cores/esp8266/WString.h @@ -202,8 +202,20 @@ class String { unsigned char equalsIgnoreCase(const String &s) const; unsigned char equalsConstantTime(const String &s) const; unsigned char startsWith(const String &prefix) const; + unsigned char startsWith(const char * prefix) const { + return this->startsWith(String(prefix)); + } + unsigned char startsWith(const __FlashStringHelper * prefix) const { + return this->startsWith(String(prefix)); + } unsigned char startsWith(const String &prefix, unsigned int offset) const; unsigned char endsWith(const String &suffix) const; + unsigned char endsWith(const char * suffix) const { + return this->endsWith(String(suffix)); + } + unsigned char endsWith(const __FlashStringHelper * suffix) const { + return this->endsWith(String(suffix)); + } // character access char charAt(unsigned int index) const; @@ -238,6 +250,21 @@ class String { // modification void replace(char find, char replace); void replace(const String& find, const String& replace); + void replace(const char * find, const String& replace) { + this->replace(String(find), replace); + } + void replace(const __FlashStringHelper * find, const String& replace) { + this->replace(String(find), replace); + } + void replace(const char * find, const char * replace) { + this->replace(String(find), String(replace)); + } + void replace(const __FlashStringHelper * find, const char * replace) { + this->replace(String(find), String(replace)); + } + void replace(const __FlashStringHelper * find, const __FlashStringHelper * replace) { + this->replace(String(find), String(replace)); + } void remove(unsigned int index); void remove(unsigned int index, unsigned int count); void toLowerCase(void); From d2d0ee3d4335a3215800481667ba484cf0f3da36 Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Tue, 12 Nov 2019 19:55:50 +0100 Subject: [PATCH 12/12] Update to LittleFS 2.1.3 (#6757) --- libraries/LittleFS/lib/littlefs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/LittleFS/lib/littlefs b/libraries/LittleFS/lib/littlefs index abd90cb84c..6b65737715 160000 --- a/libraries/LittleFS/lib/littlefs +++ b/libraries/LittleFS/lib/littlefs @@ -1 +1 @@ -Subproject commit abd90cb84c818a663b584575b019258d01d0065e +Subproject commit 6b65737715039ef92d348014316b575b52547019