1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-10 14:42:08 +03:00
Commit Graph

4460 Commits

Author SHA1 Message Date
2201770a20 Tools - makecorever.py fixed packaging & avoid needless overwrites (#9250)
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
2025-05-28 03:57:47 +03:00
4214e16671 Tools - makecorever.py explicit output argument (#9248)
* 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
2025-05-27 06:55:03 +03:00
30780cb8c9 Tools - get.py updates (#9247)
* 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
2025-05-27 02:26:22 +03:00
92002ece2e Device tests updates (#9246)
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
2025-05-21 16:21:08 +03:00
a5f18b5f91 Tools - none-cxxflags generator script & enable deprecation warnings (#9245)
* 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
2025-05-20 20:58:32 +03:00
2c72e6f015 Libraries - fix some warnings with gcc ≥12 (#9244)
* 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]
2025-05-20 19:40:21 +03:00
606324ccf8 CI - Python deprecations (#9242)
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.
2025-05-20 19:18:27 +03:00
8e2094eb08 CI - build with arduino-cli (#9241)
Sync with GCC14 branch test scripts

Remove explicit IDE, HARDWARE & LIBRARIES envirnoment in workflows in favour of script defaults
Remove explicit dependency on IDE & HARDWARE path, assume arduino-cli default paths
Remove explicit library install for platformio, share library path & downloaded libraries with arduino
Bump ConfigFile dependencies, set ArduinoJson to v7 & update blob install script
2025-05-20 18:41:11 +03:00
cd844b99d9 Docs - default to sphinx_rtd_theme (#9237)
following examples and conf.py from sphinx_rtd_theme itself
2025-05-20 16:55:20 +03:00
587435110f Docs - readthedocs.io latest (#9236) 2025-03-11 01:09:35 +03:00
7af5246c12 Docs - fix sphinx v8 builds (#9235)
abnormal version selection w/ nbsphinx causing us to fall down to 5.x.x
venv install specific versions, fix arguments provided to the sphinx-build
2025-03-11 00:04:47 +03:00
1a13ab95fb Stack thunk yield() fixes (#9224)
* 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
2025-01-24 10:17:51 +03:00
be3035c853 CI - clang-format-18 (#9225)
* Fix shell variable comparison without $CI present

+ '[' = true ']'
./tests/restyle.sh: line 16: [: =: unary operator expected

vs.

+ '[' '' = true ']'

* Update to clang-format-18

new opt to skip overly eager macro formatting
https://clang.llvm.org/docs/ClangFormatStyleOptions.html#skipmacrodefinitionbody

minor changes between 15 and 18 for ide examples

reference arduino-ide format is still stuck with 15, though
https://github.com/arduino/clang-static-binaries/releases

* Pin clang-format in CI recipe not the script itself

* style
2025-01-24 09:40:22 +03:00
bb79e9076e Documentation - fix links in station-class.rst (#9191) 2024-11-20 20:07:01 +03:00
9e3ba26258 SD - examples/listfilesEnhanced (#9206)
* 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
2024-11-20 19:32:38 +03:00
ccea72823a ESP8266WebServer - UriRegex runtime logic within assert() (#9185) 2024-08-01 03:46:51 +03:00
bb3360d0ec CI - restyle script summary and annotations in PRs (#9184)
similar to .ino builder, prepare a short 'diff' summary of all the required changes
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary

provide inline annotations, so it is apparent clang-format job is the
cause of the PR actions check failure
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-a-notice-message
2024-08-01 02:47:40 +03:00
27272de623 LwIpIntfDev.end() - check _started to prevent crash (#9173) 2024-07-31 05:53:39 +03:00
07feacec46 Update certs.h (#9182)
* Update certs.h

not_valid_{after,before} -> not_valid_{after,before}_utc

https://cryptography.io/en/latest/x509/reference/#cryptography.x509.Certificate.not_valid_before
> This property is deprecated and will be removed in a future version. Please switch to the timezone-aware variant not_valid_before_utc().

* fixup! Update certs.h
2024-07-31 03:58:18 +03:00
1d6e50f7d0 Mock - compatibility fix for shell calls (#9183)
echo does not seem to have escape mode with GH actions runner
trying to fix apparently broken makefile funcs from #9117
2024-07-31 03:07:18 +03:00
3a5157e3ba Mock - update func signatures for latest glibc (#9117)
glibc 2.38 includes strlcpy and strlcat, attempt to detect them before use
2024-07-31 02:24:41 +03:00
05f05d0dab ESP8266HTTPClient - prefer trust anchors to fingerprinting in examples (#9181) 2024-07-31 02:00:47 +03:00
bd136f1c20 Boards - add Mercury 1.0 (#9166)
Co-authored-by: Gaurang Gupta <iotgupta@gmail.com>
2024-07-31 01:40:57 +03:00
1b6f815463 Sphinx syntax fixes (#9180)
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
2024-07-31 01:28:46 +03:00
c2f136515a Fixes exceptions resulting from using SPI0Command (#9140)
* 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.
2024-07-26 00:03:52 +03:00
e4887b70ec Directly include <exception> for std::set_terminate (#8978)
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.
2024-07-25 23:36:16 +03:00
7e0d20e2b9 Update to SDFat upstream 2.2.2 (#9126)
* 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>
2024-06-20 00:32:06 +03:00
96ee7dfb8e Add creation timestamp to LittleFS directories (#9127)
* 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
2024-06-15 22:31:24 +03:00
f741521abc LwipIntfDev - legacy Ethernet API methods moved to EthernetCompat (#9133) 2024-06-15 22:06:29 +03:00
338b62577e Fix spelling errors in WebServer source (#9146) 2024-06-15 21:55:27 +03:00
7e3d1bd0d8 Broken EspSoftwareSerial example (#9153) 2024-06-15 21:40:36 +03:00
754324e56e Example WebServer WebServer.ino does not redirect when index.htm does not exist (#9142) 2024-06-15 21:32:27 +03:00
9afeaf5694 Implemented support for filters and removable routes in ESP8266WebServer (#9152)
* feat: added filters and removeable routes

* Update Filters.ino

* fix: clang-format

* chore: updated docs

* chore: updated doc

* fix: use new implementation

* fix: filters.ino example

* fix: filters.ino

* fix: formatting

* fix: formatting (2)
2024-06-15 21:20:13 +03:00
685f2c97ff decoder.py: allowing to use it live (#9108)
- avoid ctx repetition and hide some useless fw debug lines
- hide "DECODE IT"
- immediately print stack at closing marker
- check for tool executable at startup

live command line example
>  pyserial-miniterm /dev/ttyUSB0 115200 | \
        path/to/esp8266/Arduino/tools/decoder.py \
            --tool addr2line \
            --toolchain-path path/to/esp8266/Arduino/tools/xtensa-lx106-elf/bin \
            path/to/build.elf
2024-03-31 19:24:25 +03:00
75cd58f647 fix minor typo (#9111) 2024-03-27 22:58:51 +01:00
d7c50f76aa Updater - fixed signature verification for compressed binaries (#9109)
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.
2024-03-27 16:07:29 +03:00
eda4e0855f CONT stack overflow postmortem (#9083)
- 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
2024-03-26 10:58:20 +03:00
41ecd65c6a Stream: +helpers to stream regular String (#9043)
This allows to use a String as a destination Stream by using a temporary with streaming helpers.
2024-03-25 00:35:19 +01:00
8731f63594 minor typo fixes (#9106) 2024-03-25 00:15:29 +01:00
877d44059e Add url redirect (#8970)
* 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 60d2c7762e.

* Revert "auto numbering of HTTPUpdateError enum"

This reverts commit 61785b27da.

* Revert "added getAvailableVersion(), moved _httpClientTimeout and _followRedirects to protected, added enum HTTPUpdateError"

This reverts commit cec84ed17a.

* 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
2024-03-24 23:52:28 +01:00
2bb1b5a4d5 Fix semantic typo in generic-examples.rst (#9107)
exists -> exits
2024-03-19 18:01:59 +03:00
dc9abed8b9 ESP8266WiFiMulti - get number of APs in the list (#9082)
When having some more complex setups it might be helpful to know the number of APs already added to the list.
2024-03-18 00:04:44 +03:00
1248d3874e Updater - missing error codes (#9104)
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
2024-03-17 23:55:29 +03:00
760dbeeda9 emulation-on-host: +memcmp_P (#9093) 2024-03-17 21:52:26 +03:00
2064d437a3 ESP8266WiFi - document event handler lifetime, add [[nodiscard]] (#9087)
* disallow not assigning wifieventhandler somewhere

* fix markdown syntax in rst

* mention lifetime in example and docs
2024-03-17 21:11:32 +03:00
b0d9e75d50 LwipIntf - typo (#9103) 2024-03-17 20:58:39 +03:00
c96dc26792 Generate TZ.h from zoneinfo (#9084)
* Generate TZ.h from zoneinfo

Using tzdata pypi package that ships zoneinfo blobs
Can't use raw data package from IANA, need it built first
Minor tweaks to Espurna script that generated .md

More data than the original, not limited to ZONE/...
Zoneinfo source can be overwritten using path args, if needed
(but, probably not needed, since it would always be preferable to pull the latest version)

Also, allow to override certain names and tz strings independent
of tzdata values (resolves #9007)
2024-02-11 18:51:35 +01:00
9217458353 Free memory for _currentArgs after request has been handled in WebServer. (#9077)
This can reduce permanent RAM consumption significantly, if the last request had lots of arguments, but it assumes, that we do not need the arguments after we have handled a request.
2024-02-11 12:27:18 +01:00
ed9e8ce9ba Sync with esp82xx-nonos-linklayer (#9078)
* Update lwip2 builder
* Rebuild lwip2 libs
2024-02-11 12:15:26 +01:00
d7d50ffc6f Prefer Serial1 logging in examples (#9079) 2024-02-09 20:22:49 +03:00