From c33a6a261d689f1ffade44adb8fa8ab6cf48ca87 Mon Sep 17 00:00:00 2001 From: Cristian Popescu Date: Tue, 18 Aug 2020 03:26:22 +0300 Subject: [PATCH 1/2] Updater MD5 cleanup on begin (#7534) Co-authored-by: Cristian Popescu --- cores/esp8266/Updater.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cores/esp8266/Updater.cpp b/cores/esp8266/Updater.cpp index 03bc5c3f8..e5224e381 100644 --- a/cores/esp8266/Updater.cpp +++ b/cores/esp8266/Updater.cpp @@ -113,6 +113,8 @@ bool UpdaterClass::begin(size_t size, int command, int ledPin, uint8_t ledOn) { _reset(); clearError(); // _error = 0 + _target_md5 = emptyString; + _md5 = MD5Builder(); #ifndef HOST_MOCK wifi_set_sleep_type(NONE_SLEEP_T); From 1ff927d04caa28e1294e94ec10edf758bec6edf1 Mon Sep 17 00:00:00 2001 From: standby24x7 Date: Tue, 18 Aug 2020 23:45:37 +0900 Subject: [PATCH 2/2] Fix spelling typo under doc/faq (#7538) This patch fixes some spelling typo found in doc/faq. --- doc/faq/a01-espcomm_sync-failed.rst | 6 +++--- doc/faq/a02-my-esp-crashes.rst | 6 +++--- doc/faq/a05-board-generator.rst | 2 +- doc/faq/readme.rst | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/faq/a01-espcomm_sync-failed.rst b/doc/faq/a01-espcomm_sync-failed.rst index 699754ecf..a0d575e8e 100644 --- a/doc/faq/a01-espcomm_sync-failed.rst +++ b/doc/faq/a01-espcomm_sync-failed.rst @@ -313,14 +313,14 @@ example at 921600 baud, but with two reset retries. Reset Method: nodemcu, reset retries -If you are interested how noodemcu reset method is implemented, then +If you are interested how nodemcu reset method is implemented, then check circuit below. As indicated it does not pull to ground RTS and DTR lines once you open Serial Monitor in Arduino IDE. .. figure:: pictures/a01-nodemcu-reset-implementation.png - :alt: Implementation of noodemcu reset + :alt: Implementation of nodemcu reset - Implementation of noodemcu reset + Implementation of nodemcu reset It consists of two transistors and resistors that you can locate on NodeMCU board on right. On left you can see complete circuit and the diff --git a/doc/faq/a02-my-esp-crashes.rst b/doc/faq/a02-my-esp-crashes.rst index 838880ea8..aeedc8d5e 100644 --- a/doc/faq/a02-my-esp-crashes.rst +++ b/doc/faq/a02-my-esp-crashes.rst @@ -187,7 +187,7 @@ If you don't have any code for troubleshooting, use the example below: Serial.println(); Serial.println("Let's provoke the s/w wdt firing..."); // - // provoke an OOM, will be recorded as the last occured one + // provoke an OOM, will be recorded as the last occurred one char* out_of_memory_failure = (char*)malloc(1000000); // // wait for s/w wdt in infinite loop below @@ -310,11 +310,11 @@ Memory, memory, memory * If you use std libs like std::vector, make sure to call its ::reserve() method before filling it. This allows allocating only once, which reduces mem fragmentation, and makes sure that there are no empty unused slots left over in the container at the end. Stack -   The amount of stack in the ESP is tiny at only 4KB. For normal developement in large systems, it +   The amount of stack in the ESP is tiny at only 4KB. For normal development in large systems, it is good practice to use and abuse the stack, because it is faster for allocation/deallocation, the scope of the object is well defined, and deallocation automatically happens in reverse order as allocation, which means no mem fragmentation. However, with the tiny amount of stack available in the ESP, that practice is not really viable, at least not for big objects. * Large objects that have internally managed memory, such as String, std::string, std::vector, etc, are ok on the stack, because they internally allocate their buffers on the heap. * Large arrays on the stack, such as uint8_t buffer[2048] should be avoided on the stack and be dynamically allocated (consider smart pointers). - * Objects that have large data members, such as large arrays, should be avoided on the stack, and be dynamicaly allocated (consider smart pointers). + * Objects that have large data members, such as large arrays, should be avoided on the stack, and be dynamically allocated (consider smart pointers). If at the Wall, Enter an Issue Report diff --git a/doc/faq/a05-board-generator.rst b/doc/faq/a05-board-generator.rst index 1e260fa3c..279491355 100644 --- a/doc/faq/a05-board-generator.rst +++ b/doc/faq/a05-board-generator.rst @@ -129,7 +129,7 @@ Additional Notes: 1. The boards.txt file will always contain the generic and esp8285 boards. -2. If boards.txt file exist and no backup copy named boards.txt.orig exist, the current boards.txt will be renamed to boards.txt.orig. Otherwise, the existing boards.txt is over-writen when you generate a new boards.txt file. Similar behavior for when generating a new boards.local.txt. +2. If boards.txt file exist and no backup copy named boards.txt.orig exist, the current boards.txt will be renamed to boards.txt.orig. Otherwise, the existing boards.txt is over-written when you generate a new boards.txt file. Similar behavior for when generating a new boards.local.txt. 3. The boards in the boards.txt file will be in the order they were listed in your favorites file, specified by option ``--filter ``. diff --git a/doc/faq/readme.rst b/doc/faq/readme.rst index cbfbdb270..74e221196 100644 --- a/doc/faq/readme.rst +++ b/doc/faq/readme.rst @@ -55,7 +55,7 @@ How can I get some extra KBs in flash ? About WPS ~~~~~~~~~ -From release 2.4.2 and ahead, not using WPS will give an exra ~4.5KB in +From release 2.4.2 and ahead, not using WPS will give an extra ~4.5KB in heap. In release 2.4.2 only, WPS is disabled by default and the board generator is