* Bug fixes to EspSoftwareSerial, release 6.6.0
Various improvements to the Delegate class template.
Memory footprint reduction of SoftwareSerial instances based on 3rd party contribution by @dirkmueller
* Bug fix EspSoftwareSerial, delegate template programming for > 3 platforms is interesting.
Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
Co-authored-by: Develo <deveyes@gmail.com>
* PROGMEM footprint cleanup for responseCodeToString
Doing returns with String/FlashStringHelper conversion for every
case means that the code for doing that is duplicated, which
is wasteful. doing it only once saves about 250 bytes (50%) of
code size.
* Remove "I'm a teapot" error code
* Add inline code comment to explain rationale
Use the proper api (::clear(), isEmpty()) instead of doing
comparisons/assignments of empty strings. Also fix mixture
of tabs and spaces in the source code.
- Replace const with constexpr where possible.
- Use default constructor instead of copy constructor for IPAddress variable initialization.
- Add MeshTypeConversionFunctions namespace around TypeConversionFunctions.
- Add MeshUtilityFunctions namespace around UtilityFunctions.
- Add ESP8266WIFIMESH_DISABLE_COMPATIBILITY preprocessor flag to retain compatibility with old code despite new namespaces.
- Add setLogEntryLifetimeMs and setBroadcastResponseTimeoutMs methods to EspnowMeshBackend.
- Move FloodingMesh constant definitions from header to .cpp file to reduce the risk of extra RAM consumption.
- Add deactivateAP method to FloodingMesh.
- Make deactivateAP static and add new non-static deactivateControlledAP method to MeshBackendBase.
- Add example of how to transfer null values using multiStrings to HelloEspnow.ino.
- Improve documentation.
- Improve comments.
* Add a CRC32 over progmem and ESP.checkFlashCRC
Automatically embed a CRC32 of the program memory (including bootloader
but excluding any filesystems) in all images in unused space in the
bootloader block.
Add a call, ESP.checkFlashCRC() which returns false if the calculated
CRC doesn't match the one stored in the image (i.e. flash corruption).
Fixes#4165
* Add example that corrupts itself, comments
Show CRC checking catch a 1-bit error in program code by corrupting a
large array, and then return it to clean and verify the CRC matches once
again.
Add comments to the CRC check routine
Clean up pylint complaints on crc32bin.py
* Check linker script for CRC space in bootsector
Add an assertion in the eboot linker file to guarantee that we have at
least 8 bytes of unused space at the end of the boot sector to patch in
the CRC. If not, the eboot link will fail.
* Add note about what to do if CRC check fails
Per discussion with @d-a-v.
When the CRC check fails, you could *try* to do certain things (but may
not succeed since there is known flash corruption at that point). List
a few ideas for application authors.
* Only single, flash/ram friendly crc32() function
* Combine the CRC calc and bin generation in 1 step
Per discussion w/@mcspr, combine the CRC calculation with the binary
generation, removing the additional build step.
* Add documentation for compressed OTA, fix bug
Fixes#6923
Documents the user steps needed to do a compressed upload, and notes the
2-step process needed for deploying compressed uploads to the field for
the first time.
Fixes a bug in serial output formatting discovered by @AdrianEddy.
Adds additional contributors for uzlib, per @pfalcon.
* Update README for esptool.py, too
* EspSoftwareSerial 6.5.0 public release.
* EspSoftwareSerial bug fix public release 6.5.1
* Release 6.5.2, examples changed only, simplified adding WiFi setup etc. by moving logger setup up to the front.
* Parity bug fix: Overflow condition caused data and parity to get out of sync permanently.
Remove chocolatey (Win package manager) usage because it seems to often
have issues. Use the main sources for Python3 and sed, instead.
Fix size printouts to use a simpler script which should work under
Windows and all UNIX-like OSes.
* Allow GZIP compressed flash updates
Modified the bootloader to be able to take stored updates in compressed
GZIP format (i.e. the output of "gzip -9 xxx.bin") and decompress them
on-the-fly to their final destination. This can work for apps and for
filesystems (when used with the 2-step update option).
Allow eboot to be built using -Os/2 optimizations by fixing some portions
which failed when any optimizations were used. Add -Wall and use data
and function sections to reduce size. Use -Os to minimize size.
Remove obsolete esptool-ck calls to build a .ROM image, we don't use it.
Move all uninitted variables to RAM from IRAM, allowing 8-bit access.
Hook in @d-a-v and @pfalcon's uzlib port to actually do the
decompression. Do not use any CRC checking which saves space. Since we
have overwritten all of flash by the time we know id the CRC matches,
there's nothing we could have done anyway.
Adjust the Updater class to support GZIP files and not attempt to patch
them.
Bootloader builds to 0xd90 out of 0xfff bytes.
* Add @d-a-v's patch for httpupdate
https://github.com/esp8266/Arduino/pull/6820#pullrequestreview-326541014
* Update uzlib to point to pfalcon++
For now, because there are some self-test failures with @d-a-v's esp8266
branch (whose cool new features we don't actually use in eboot now)
start with pfalcon's 2.9 release and add the 2 patches (clcidx to code
from IRAM/RODATA, and the Windows test file renaming) needed to build
and run successfully.
* Add (c) notice for uzlib to README
* change to make inline helpers truly inline [issue 6875]
* pulled the inline helpers out of the TWI class [issue 6875]
* removed some inlines causing issues [issue 6875]
* removed 2 more inlines from slave timeout section [issue 6875]
* removed 2 more inline attributes on public functions, moved twi_scl_valley up into the master section [issue 6875]
This commit avoids OOMs on an udp corner case where a delay() in the main
loop would allow memory filling.
A memory leak has been observed with such semantically forbidden delay,
unsolved yet, and preventing to use a simple counter instead of walking
through a linked list. The count limit is however small.
The method #send(int, char*, char*[, size_t])) is a virtual method which
calculates the size of the content then calls #send_P(int, PGM_P, PGM_P,
size_t). This particular implementation of #send_P differs from the other
implementations of #send and #send_P in that it uses #sendContent for
headers and always calls #sendContent_P for contents even when the
contents is not specified.
The method #sendContent is intended for body and prepends the chunksize
in chunk mode but this breaks the HTTP protocol which does not expect a
chunksize prior to the headers.
Fix is simply to do the same thing as all the other methods - call
_currentClient.write and only call #sendContent_P if there is content to
send.
Fixes#6524
Should help with speed of output when printing large flash strings to
things like a file or a TCP connection.
Use a 128 byte chunk in a temp buffer to send data using write(),
reducing the # of write calls by ~128x.
Fixes#6880
The updater was patching in the proper flashmode configuration byte for
all uploads, apps and filesystems. This ended up corrupting one byte on
every FS upload.
Change updated to only patch theflashmode if it is doing an app.
* Update PROGMEM.rst
Include array of strings in the description, since the examples in Arduino do not consider the right pointer size
* Update PROGMEM.rst
* sdk:22x191122
another firmware to test
not default: v2.2.1-119-ga0b1311 (shows as SDK:2.2.2-dev(a58da79) in debug mode)
default unchanged
* and the obj files
- Add uint8ArrayToMultiString and bufferedUint8ArrayToMultiString TypeConversionFunctions to facilitate transfer of Strings containing null values.
- Add HKDF to CryptoInterface.
- Add ChaCha20 + Poly1305 AEAD to CryptoInterface.
- Add customizable nonce generator to CryptoInterface.
- Add ability to automatically encrypt/decrypt ESP-NOW messages via AEAD (ChaCha20 + Poly1305), independent from encrypted ESP-NOW connections.
- Greatly improve performance of incrementSessionKey, espnowGetMessageID, espnowSetMessageID and all non-template TypeConversionFunctions. The average performance increase is roughly a factor 5. Fun fact: Printing a MAC to a HEX String is now over twice as fast when using TypeConversionFunctions compared to using standard functionality like sprintf.
- Add uint64ToUint8Array and uint8ArrayToUint64 TypeConversionFunctions.
- Make it possible to use String values as ESP-NOW and FloodingMesh key seeds, instead of just requiring plain key arrays.
- Add customizable responseTransmittedHook to sendEspnowResponses.
- Add _responsesToSendMutex to make the new responseTransmittedHook safe to use.
- Remove verboseModePrinting from sendPeerRequestConfirmations method to reduce performance variations.
- Fix faulty messageID generation in FloodingMesh.
- Make assert checks more complete and easier to understand in the setMetadataDelimiter method of FloodingMesh.
- Rename EspnowEncryptionKey to EspnowEncryptedConnectionKey since there are now multiple encryption keys.
- Rename acceptsUnencryptedRequests to acceptsUnverifiedRequests, unencryptedMessageID to unsynchronizedMessageID, receivedEncryptedMessage to receivedEncryptedTransmission, since there are now multiple modes of encryption.
- Rename resultArrayLength to outputLength in CryptoInterface and remove its value restrictions in order to match the BearSSL functionality.
- Improve performance of FloodingMesh::encryptedBroadcast.
- Rename FloodingMesh methods maxUnencryptedMessageSize/maxEncryptedMessageSize to maxUnencryptedMessageLength/maxEncryptedMessageLength, so that String length naming is consistent within the library.
- Update examples to illustrate the new features.
- Improve comments.
* help in makefile
* fix some device tests, http_server is pending
* fix webserver test, one test is disabled due to general python2->3 failure
* remove debug strings
* minimize diff
* set reset method back to the default one on generic board
* fix vcc range check from datasheet
vcc is read as 2.9V here, datasheet says 2.5-3.6, old low limit was 3v
* tell python to decode string
* Remove user_interface.h from gdbstub includes
Avoid a warning by not including the unneeded "user_interface.h" from
gdbstub.c. Leftover from original stub code from the SDK, this include
is unnecessary in the Arduino core.
* Add example to ensure gdbstub compiles in CI
Ensure the same user_interface warning doesn't occur in the future by
adding the example shown in the GDB docs to the CI build process.
* At least the F_CPU define in host mock.h is needed by host Arduino.h - need to include Arduino.h further down in mock.h for this to work.
* Geting the include order right
The FS uploader plugins need to be updated to use python3 and not
python, or they will fail on Windows (or Linux boxes without an
installed python2 interpreter).
Update the documents to point to the new versions.
This is all @dirkx , whose PR unfortunately got borked when we were
trying to update it to the new format. As @dirkx said:
When sending POST responses of well over a K - _write() may not sent it
all. Make sure we do -- but cap the individual writes - as somehow large
2-3k blobs seem to cause instability (on my 12F units).
Supercedes #2528
* EspSoftwareSerial: ctor/begin() compatibility to AVR/ESP8266/ESP32 HW release 6.2.0
* Release 6.2.1: In loopback example, explicit pin settings and for ESP32, realistic max. bps for single stop bit config.
* Loopback example can exploit new invert API in HardwareSerial
* EspSoftwareSerial 6.3.0
The eboot command was cleared from the rtc mem before the firmware copy
making it possible for a power failure during an OTA update to brick the
esp until the firmware was loaded via USB because of a partial firmware
copy that would never be restarted.
Moving the eboot_command_clear to after the copy ensures that any partial
copy is restarted at next power on.
Fixes#6811 which found an issue where connecting to scripts.google.com
would *occasionally* cause a crash. On inspection, it was found that up
to 5828 bytes of stack were used once in a while, so expand the stack to
5900 bytes to cover this case plus a little extra.