1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-15 00:02:49 +03:00
Commit Graph

4438 Commits

Author SHA1 Message Date
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
e6df345584 CI - clang-format-15 (#9085)
Stop CI from pulling LLVM repos and using GNUPG keyservers,
ubuntu-latest already has clang-format-{13,14,15}

Fixes long-standing issue with -style=file:...
2024-02-09 17:39:38 +03:00
16e19181b9 ESP8266WebServer - fix possible memory leak in request argument handling (#9076)
* fix possible leak of _postArgs array in case of returning early from _parseForm().
* don't use _postArgs member, but instead use a new local variable postArgs instead.
* same for _postArgsLen member vs.local postArgsLen.
* remove useless NULL pointer check before delete().
* Remove _postArgs member from ESP8266WebServer.h
* Remove searching through always empty _postArgs array in ESP8266WebServer-impl.h
2024-02-09 17:28:14 +03:00
de1029ffe0 Bump actions/cache from 3 to 4 (#9074)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-22 23:34:12 +03:00
47327e8449 Bump actions/setup-python from 4 to 5 (#9052)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Prokhorov <prokhorov.max@outlook.com>
2024-01-19 20:12:40 +03:00
b3b9276bf9 Avoid NPE and "multi-deinitialization" of ArduinoOTA (#9058)
Avoid a null pointer exception when ArduinoOTA.end() is called more than once and thus the UDP socket is already freed.

Also avoid unnecessary teardown if the class is not initialized yet (for example, begin() wasn't called yet, or end() is called multiple times).
2024-01-18 23:26:18 +03:00
d5eb265f78 WiFi config(): warning for legacy idioms (#9050) 2023-12-12 00:57:57 +01:00
cb9734c97d WiFi.h as alias to ESP8266WiFi.h (#9044) 2023-12-08 10:50:54 +01:00
ce210840b4 document WiFi.config Arduino parameters versions (#9045) 2023-12-08 10:25:38 +01:00
71764d2681 doc: config(0,0,0) to restore dhcp + mention portable network API (#9042) 2023-12-04 16:12:32 +01:00
089fe8fca7 use uriglob to catch all android captive portal requests (#9041) 2023-12-04 16:01:57 +01:00
9e73cf0021 LwipIntfDev - config static IP auto gw,mask,dns as in Arduino libraries (#9040)
for 'modern' Ethernet libraries W5100lwIP, W5500lwIP and ENC28J60lwIP
used without EthernetCompat
2023-12-01 10:36:35 +01:00
1efe5ee3fc LwipIntfDev - add parameter's missing default value for dnsIP(n) (#9039) 2023-12-01 09:44:55 +01:00
9a4e17876e WiFi - static IP auto gw,mask,dns as in Arduino libraries (#9031) 2023-11-24 10:10:27 +01:00
32c858df6d ask user not to post stack dumps, but to decode them (#9037)
* ask user not to post stack dumps, but to decode them
2023-11-24 09:32:29 +01:00
0301465a3c elf2bin.py - Fix syntax warning (#9034) 2023-11-17 23:15:34 +01:00
5e0ed3a38b Revert "WiFiSTA - allow using DHCP again after disconnecting static IP (#9020)" (#9028)
This reverts commit 0c599ee0dc.
2023-11-13 00:26:16 +01:00
ee953737dd WiFiServer - allow constructor without parameters (#9026) 2023-11-13 00:10:26 +01:00
d0f7293491 optionally move float emulation code into iram (#8958)
* optionally move float emulation code into iram
allows doing float operation in iram
suitable for libraries like AccelStepper when called from ISR
* proposed changes for pio from @mcspr
2023-11-12 23:53:39 +01:00
74c04c88c5 LwipIntfDev - method end() to enable repeated begin (#9023) 2023-11-12 23:41:08 +01:00
c84fda145c Resolve HWDT Reset with core_esp8266_vm (#9025)
* Resolve HWDT Reset with core_esp8266_vm

With the newer GCC compiler (after tag 3.0.2), example virtualmem was crashing with a HWDT reset.
Reordered some SPI register set lines in spi_init().
New ordering was based on ::begin in SPI.cpp

This change may resolve issues describe in
https://github.com/esp8266/Arduino/discussions/9010

* Added memory barrier to changes
spi_ctrl appears to need setting before other SPI registers
2023-11-12 23:26:35 +01:00
7fc2caa72f WiFiSTA - method setDNS as in WiFi libraries by Arduino (#9021)
https://www.arduino.cc/reference/en/libraries/wifi/wifi.setdns/
2023-11-10 15:30:31 +01:00
5bd52d4f86 EthernetCompat - static IP auto gw,mask,dns as in Arduino libraries (#9024) 2023-11-10 15:00:56 +01:00