- don't check exc_info() in `finally`, it only works without `except` with just `try` and `finally`
see https://docs.python.org/3/reference/compound_stmts.html#try
after `except Exception as e:` block, `e` is already deleted
- handle a rare case when esptool code does not close 'erase_file'.
printing paths may cause encoding issues, so just fall through silently
- simplify ordering of write_flash & erase_region arguments
since we always end up in write_flash, prefer to think of it as argument pairs 'addr' + 'path'. actual binaries go first, erase
temporaries go last. construct write args beforehand and apply when finishing with the command line.
both commands can appear multiple times, for manual or scripting cases, where multiple regions should be erased / written to
post #9224, allow to call 'stack_thunk_yield()' outside of bssl context
Reset 'stack_thunk_save' before returning from 'thunk_...'ed function
Skip invalid a1 load and yield with the current value
update packaging script w/ new arguments
rewrite ci build pattern to only rewrite core_version.h once per job
restore behaviour from #6414 for other cases
* Tools - makecorever.py explicit output argument
Don't hide where the file is actually placed
Using pathlib instead of raw strings to simplify path ops
Plus, add stdout preview when output is missing
Clean-up git-describe <-> version availility checks
* typo
* fix unhandled exc in git cmd
* unused escape
* RELEASE using same values
* Tools - get.py updates
Using pathlib for paths, assume relative paths from __file__.parent as PWD
Using argparse for arguments, expose previously uncustomizable bits.
Reading tarfile with transparent compression.
Drop previously untested .t{...} and .tar.{...}, just use "r:*"
Remove hard-coded dependency on 'platform' and allow to specify sys_name, sys_platform and bits.
Stub for DarwinARM, allow to fetch x86_64 packages in the meantime.
* missing mkdir_p
Stop pyexpect from closing serial port when running with WSL2
Remove makefile flags & opts making it too silent. At some point it makes a lot of useful info just disappear. There are external means of silencing make, so probably best to leave useful data always available
Replace SPIFFS with LittleFS in FS test
Re-use certs-from-mozilla.py in FS test
Fix libc tests w/o -fno-builtin not actually testing anything, also add the flag via .globals.h in case it breaks
Fix libc tests generating warnings when using invalid (but safe) size arguments
* Tools - none-cxxflags generator script
GCC10 -> GCC (as in general, not specific to 10)
cpp -> cxx to be consistent with gcc terminology
grep exclude patterns in a separate file
exclude 'deprecated' warnings by default
* actually set warnings when compiling
--warnings=none is arduino-cli implicit default
* ESP8266WebServer - unused templated code throws out unused statics
currently, only w/ mock build because it is using gcc>=12
> ../../libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h:14:15: warning: ‘String esp8266webserver::calcETag(fs::FS&, const String&)’ defined but not used [-Wunused-function]
> 14 | static String calcETag(FS &fs, const String &path) {
> | ^~~~~~~~
* ESP8266WiFiMesh - fix classes used as aggregates
> error: designated initializers cannot be used with a non-aggregate type '...'
gcc10.3 allowed this construct for some reason
* LEAmDNS - consistent const <-> non-const accessors
> error: infinite recursion detected [-Werror=infinite-recursion]
py3.13 - https://docs.python.org/3/library/re.html#re.sub
> Deprecated since version 3.13: Passing count and flags as positional arguments is deprecated. In future Python versions they will be keyword-only parameters.
py3.12 - https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extraction_filter
> If extraction_filter is None (the default), calling an extraction method without a filter argument will raise a DeprecationWarning, and fall back to the fully_trusted filter, whose dangerous behavior matches previous versions of Python.
* Update bearssl builder
* Keep bssl stack pointer from confusing yield
implement stack_thunk_yield() which is called within bssl
stack overflow checks for cont would always fail otherwise
* add new example for enhanced file listing
* adapt Pin
* adapt due to clanf format check in line 14
* Adapt further clang findings
* additional intention corrections
* last clang format issues corrected
* case-sensitive, eof line break
get rid of warnings when converting python -> rst, force quit when they happen
fix code-blocks, always need extra line
fix invalid headers refs so they actually work
* Resolves exceptions occuring when using SPI0Command for flash write operations
such as: Write Status Register-1, Sector Eraser, etc.
Moved PRECACHE_END to ensure `Wait_SPI_Idlep` and `xt_wsr_ps` are included in the iCache.
Added SPIUCSSETUP to give more settling time for #CS.
* There was a risk of flash reads inserted between an "enable opcode"
and the "target opcode". They are now tightly coupled.
Update flash quirks.
* When sending instruction Write Enable 0x06, use BootROM API
SPI_write_enable for the special handling of the WEL bit.
Corrected zero mask for fractional byte returns where the partial
byte bits are positioned at the most significant bit position in the byte.
I was recently trying to compile this project with a more recent version of GCC and hit an issue with this file. With older versions the std::set_terminate definition was being included via a transitive include of <exception> from the C++ standard library implementation. This is no longer the case with newer versions of libstdc++. This fixes the issue by using a direct include instead of relying on an implementation specific transitive include.
* Update to SDFat upstream 2.2.2
Pull in reformatted/slightly refactored SDFat 2.2.2 upstream.
Very minor changes, simple testing on other architectures passed w/o
incident.
* Fix SdFat to build for ESP8266
2.2.2 removed a define from the configuration header which is needed to
compile on the ESP8266. Restore the default values there previously.
* SDFat Debug tests not compatible, skip
---------
Co-authored-by: Max Prokhorov <prokhorov.max@outlook.com>
* Add creation timestamp to LittleFS directories
Partial fix#9120. This is simple enough to include and does not increase
the amount of flash writes on file updates significantly (which a
modified-time 't' attribute would).
* Fix typo in debug message on error
Previously, Arduino Core attempted to read from flash memory without proper consideration for the 4-byte alignment requirement when calculating the hash for the signature verification. This did not present an issue when uncompressed binaries are checked as all compiled binaries are 4-aligned (unconfirmed, just an educated guess), and signature verification appears to work well in these cases.
When uploading a compressed binary (based on this) the gzip algorithm makes no attempt to produce a 4-aligned file. The rest of the signing results in a valid signed binary regardless, however when calculating the hash for the verification process there is a ~75% chance that the hash will include some bytes from the signature, thus compromising the whole signature verification process.
editorial note: ESP.flashRead for u8 arrays (aka byte arrays) was already updated to properly handle both aligned and unaligned target buffer and / or length, while u32 expects that its arguments are already aligned. Since array pointer in Updater is already aligned, this properly handles unaligned size case.
- check in cont_run() and cont_suspend() whether a1 is out of bounds
- in case a1 is broken, postmortem will still report proper context in
proper stack boundaries
additionally
- as suggested in #9069, change stack smashing to a single line that
does not mention any Exceptions
- reduce overall stack dump length when there are know garbage values i.e. cont stackguard
- decoder.py addr search regexp would no longer skip stack lines with '<'
- fix decoder.py parsing so it notices both stack smashing and alloc errors
* added getAvailableVersion(), moved _httpClientTimeout and _followRedirects to protected, added enum HTTPUpdateError
* auto numbering of HTTPUpdateError enum
* added getAvailableVersion(), debug output current current Sketch MD5
* Revert "added getAvailableVersion(), debug output current current Sketch MD5"
This reverts commit 60d2c7762e7fb1fed7fae37fa99be149e12f125c.
* Revert "auto numbering of HTTPUpdateError enum"
This reverts commit 61785b27da3f2d42f8f95316d78ce22e5b00103a.
* Revert "added getAvailableVersion(), moved _httpClientTimeout and _followRedirects to protected, added enum HTTPUpdateError"
This reverts commit cec84ed17ab149d3e48082293f9e2723246b7d0b.
* add redirect function
* enhanced redirect() by cache control and client stop
* updated redirect() comment
* replaced redirect() API calls in examples
* server.client().stop() not needed, redirect() does this
Adds the two missing error states when beginning an Update. There were debugging logs for this but the error state was not set which would lead to confusion