1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

4393 Commits

Author SHA1 Message Date
david gauchard
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
Juraj Andrássy
74c04c88c5
LwipIntfDev - method end() to enable repeated begin (#9023) 2023-11-12 23:41:08 +01:00
M Hightower
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
Juraj Andrássy
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
Juraj Andrássy
5bd52d4f86
EthernetCompat - static IP auto gw,mask,dns as in Arduino libraries (#9024) 2023-11-10 15:00:56 +01:00
Juraj Andrássy
0c599ee0dc
WiFiSTA - allow using DHCP again after disconnecting static IP (#9020) 2023-11-10 10:54:17 +01:00
Juraj Andrássy
097e59f2e1
LwipImtfDev - add DNS IP getters/setters and MAC getters (#9022)
Ethernet styles getters/setters and WiFi styles getters/setters
2023-11-10 10:27:38 +01:00
AriaN
31c1592ad6
add Stream::readStringUntil function that uses string terminator (#9011)
* add readStringUntil function with string terminator
* rename count parameter to untilTotalNumberOfOccurrences
2023-11-07 14:19:31 +01:00
Holger Müller
fb8d6d668d
ESP8266HTTPUpdate: Get available firmware version from update server (#8968)
* added getAvailableVersion(), moved _httpClientTimeout and _followRedirects to protected, added enum HTTPUpdateError

* auto numbering of HTTPUpdateError enum

* added getAvailableVersion(), debug output current current Sketch MD5

* updated advanced updater php script

* switch case indention corrected

* 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.

* corrected incorrect merge with master
2023-11-05 00:01:49 +01:00
Juraj Andrássy
30c6df4639
WiFiServer - operator bool() and method end() (#8995) 2023-11-04 23:39:46 +01:00
Juraj Andrássy
497dacc78f
WiFi.BSSID and scan result BSSID with parameter as other WiFi libraries (#9008) 2023-11-04 23:29:06 +01:00
Earle F. Philhower, III
1662248b39
Add link to IDE 2.x LittleFS upload tool (#8998) 2023-10-08 10:30:00 -07:00
dependabot[bot]
7f2deb14a2
Bump actions/checkout from 3 to 4 (#8984)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  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>
2023-09-05 14:48:53 +03:00
M Hightower
a348833a81
A new approach for erasing WiFi Settings (#8828)
* A new approach for erasing WiFi Settings

Add support for hardware reset function call - simulates EXT_RST via HWDT.

Add reset selection to `ESP.eraseConfig()` for calling hardware reset
after erasing the WiFi Settings.

Update ArduinoOTA to use `ESP.eraseConfig(true)`

Externalized `ArduinoOTA.eraseConfigAndReset()`

Add OTA examples to illustrate using erase config changes.

* style
fixed confused example

* improve wording

* Add new state to retry eraseConfigAndReset

* Removed unreachable error test from examples.

Removed continuous retry of "eraseConfig" and allow the script to
assign an error handling option for "eraseConfig" failure.

Update example to use error handling option.

* In eboot for function ets_wdt_enable() added missing arguments

* Update comments and example

* Wording

* Rebuilt eboot.elf with current tools from ./get.py

* Requested changes.

* cleanup comments

* Update hardware_reset

Avoid using "[[noreturn]]" - not accepted for a .c file function
Updated to use __attribute__((noreturn)) to handle both .cpp and .c
file functions.
2023-08-29 17:24:07 +02:00
Luciano Martorella
1a4663fbe8
Add virtual beginMulticast(...) stub to UDP class (#8969)
* - Same UDP API of ESP32 core

* - PR review
2023-08-15 19:25:58 +03:00
reyfel
f2da54d3a2
Add softAPbroadcastIP (#8963) 2023-07-27 00:52:59 +02:00
Ahmed El-Sharnoby
90c4e3afc1
Change host from tls.mbed.org to api.my-ip.io (#8931)
https://tls.mbed.org/ host does not support MFLN and Also Redirects the Client.
https://api.my-ip.io/ip is a better alternative, supporting MFLN and allowing the user to get a simple text with a useful information.
2023-07-24 01:32:06 +02:00
david gauchard
b7f7b7488a
fix delay(0) (#8960) 2023-07-19 00:25:31 +02:00
Max Prokhorov
10cd3a1eae
Document git version install, upkeep and PR management (#8902) 2023-07-19 00:12:35 +02:00
M Hightower
dcceee8cbd
Fixes occasional UMM_POISON failure (#8953)
* Fixes occasional UMM_POISON failure

Bug introduced with PR fix #8914.
When a reallocated pointer could not grow in place, a replacement
allocation was created. Then UMM_POISON was written to the wrong block.

* Fix umm_poison data corruption on realloc when memory move is used.

Bug introduced with PR fix #8914

* refactored to resolve unused error in some build contexts
2023-07-18 23:34:42 +02:00
M Hightower
521ae60a89
Fix for dangerous relocation: j: cannot encode (#8925)
Fixes to recent changes to Postmortem to cover large jump offsets, use relaxed jump (J.L) in __wrap_system_restart_local.
Also add check that epc1 is a valid code address before reading.
2023-06-16 18:39:29 +03:00
supersjellie
8b33e2e250
Fix for occasional WebServer timeout issues (#8944)
Fixes #8941
2023-06-14 08:22:27 -07:00
Suwatchai K
e05656bd78
Add support WiFiClientSecure TCP KeepAlive (#8940)
* Add support WiFiClientSecure TCP KeepAlive
* Make TCP keepalive and related functions virtual.
* Make TCP keepalive and related functions override.

Fixes #8939
2023-06-11 11:11:38 -07:00
M Hightower
57fa6cdc92
Soft WDT: detect deliberate infinite loop at Postmortem (#8918)
A popular method of handling an unrecoverable state is to reboot. The SDK does this in many places by printing a cryptic debug message followed by something equivalent to while(true){}, which compiles down to loop: j loop, creating a Soft WDT reset.
2023-05-01 02:05:32 +03:00
M Hightower
c517bfd997
umm_poison false positive from ISR (#8914)
The umm_poison logic runs outside the UMM_CRITICAL_* umbrella. When interrupt routines do alloc calls, it is possible to interrupt an in-progress allocation just before the poison is set, with a new alloc request resulting in a false "poison check fail" against the in-progress allocation. The SDK does mallocs from ISRs.

SmartConfig can illustrate this issue, see
https://github.com/esp8266/Arduino/issues/3494#issue-247919259

Other Sketches built with Debug: "Serial," that use the SDK's Promiscuous callbacks are also likely to encounter problems.
The SDK support for "Promiscuous Receive" allocates memory from an ISR context, occasionally interrupting the poison wrapper code before it finishes setting the poison fences resulting in a false poison failed event.
2023-04-28 15:57:50 +03:00
ilmanowar
ad9aaef8c8
Fix removing first certificate in certs-from-mozilla.py (#8907)
.pem list has no headers, that operation removes a real certificate.
2023-04-22 17:33:27 +03:00
Dirk O. Kaar
c3f36316bf
EspSoftwareSerial 8.0.2: possibly uninitialized inverted mode flag fix (#8911) 2023-04-22 16:57:12 +03:00
Takayuki 'January June' Suwa
65579d2908
Make precache() cleaner and more efficient (#8903)
No need to issue a MEMW instrunction per load from each cache line.
Only once after the last load is sufficient.

  MEMW ensures that all previous load, store, acquire, release, prefetch,
  and cache instructions perform before performing any subsequent load,
  store, acquire, release, prefetch, or cache instructions.

    -- MEMW (Memory Wait), 6. Instruction Descriptions,
                                      Xtensa ISA Reference Manual (p.409)
2023-04-06 01:26:34 +03:00
M Hightower
a76ef290ea
Support user_rf_pre_init() for SDK v3.0 (#8888)
* For SDK v3.0+, early system calls that were called from user_rf_pre_init
(SDK v2.2) need to now be called from user_pre_init.

Moved user_rf_pre_init() call to the end of user_pre_init() so we
can still perform early calls like: system_phy_set_rfoption(rf_mode),
system_phy_set_powerup_option(2), etc.

* Update comment

* Improve "spoof_init_data" enable/disable logic.
Out of an overabundance of caution, limit logic change to the
experimental SDK v3.0.5.
2023-03-30 19:54:28 +02:00
david gauchard
97018a5bbf
various minor web fixes (#8885)
* httpclient: use refs - httpserver: add chunks in examples

* basic https client: update cert

* debug log: read() returning -1 is usual and means "nothing to read"

* emulation on host: SSL server has never been and is now working

* style

* move SSL server certs from examples into a single place with appropriate warnings

* web-hello-servers: make chunks bigger

* factorize template declaration

* http-client: add getString(pre-reservation)

* mock: add umm_info()

* style

* comment API in example

* style

* fix per review
2023-03-30 19:39:35 +02:00
M Hightower
d3c102e717
Update documentation and arduino debug options (#8837)
* Update documentation

Describe how to improve Exception Decoder results.

Updated build option details.

* Added d-a-v's code. And updated description and debug macro.

* Update doc

Updated platform.txt - positioned -Os such that it can be overridden by `build.opt`.

Add suggestion of using `-Og` which may improve the Decoder's line number correlation
with the problem in the source code.

Untested adjustments to platformio-build.py

* Fixed code formatting

* Fixed example

Previously `-O3` in the example had no effect. It was overridden by later flags.
Reording the `-Os` allowed changing optimization to  work. Somehow this triggered
a new warning "Stream.h:50:7: warning: 'f.Stream::_startMillis' may be used
uninitialized in this function". Replaced `-O3` with `-Og`.

* Proposed "Debug port" menu change
Preserves a pathway for `build.opt` override.

* Update boards.txt.py and docs - WIP

* Improve organization of optimization content.
Use "Debug Optimization" for menu name.
The menu item defines the initial optimization.
platform.txt - optimization parameter can be overridden by build.opt.

* Add fallback value for build.debug_optim to platform.txt

* update text and undo changes to platformio-build.py

* tweak text

* Added ':orphan:' mark to a06-global-build-options.rst

* Update doc. Added link in page index to 'Improving Exception Decoder Results'

* Update text to reference PR#8868 improvements for leaf function.
2023-03-29 11:16:33 +02:00
Earle F. Philhower, III
ce9e72014b
Update compiler toolchain to 3.2.0 (#8868)
* Update compiler toolchain to 3.2.0

Includes compiler updates from @jjsuwa-sys3175

* Manually update python3-via-env tools
2023-03-29 10:55:09 +02:00
david gauchard
a5d31a7187
deprecate and update Stream::send*(Print -> Stream) (#8874)
* deprecate and update Stream::send(Print -> Stream) in order to benefit from and use output's timeout value
2023-03-28 11:21:05 +02:00
david gauchard
01d1c8e46f
3.1.2 is released (#8894) 2023-03-20 23:49:21 +01:00
david gauchard
210897ef83
Release 3.1.2 (#8893)
* release 3.1.2
3.1.2
2023-03-20 23:14:05 +01:00
Max Prokhorov
734defb87d
mkbuildoptglobals.py: assert python version (#8886)
Fix unused var causing warnings
Assert minimal supported version of python3
Python 3.7 in documentation
2023-03-17 11:10:14 +03:00
M Hightower
84a59aa97f
Add reporting address interrupted by Soft WDT (#8851) 2023-03-11 18:22:10 +03:00
Dirk O. Kaar
23036328a5
EspSoftwareSerial 8.0.1: onReceive bug fix and new namespace (#8869)
* Upcoming EspSoftwareSerial 7.0.1

* EspSoftwareSerial example: higher bitrates due to forcing half-duplex

* Adapt to SoftwareSerial's latest use of namespace.

* In EspSoftwareSerial, some renaming after review feedback.

* EspSoftwareSerial's use of a template class in order to permit users their own GPIO capabilities definitions.

* CI caught some warning.

* Stick to non-namespace EspSoftwareSerial class name for the moment.

* Delegate operator() is now nullptr-safe, good for use in ISRs.

* Pushed EspSoftwareSerial 8.0.1: Platformio picks up versions that aren't published in Github
2023-03-11 18:02:04 +03:00
Lars Kellogg-Stedman
6ad9bf3b07
Expand the esp8266 hardware debugging limitations section (#8879)
It's trivial to run into a problem caused by the single hardware breakpoint
limitation, but the existing documentation doesn't explicitly address this
situation (and search results for the error message aren't particularly
helpful).

This commit updates the documentation with an explicit example of what
happens when a breakpoint expression matches multiple locations, along with
a possible workaround.
2023-03-11 12:44:50 +01:00
Bogg
503502f13b
Weak assignment in flash_hal (#8884)
The assignment done in FLASH_MAP_SETUP_CONFIG_ATTR did not apply the attribute to __flashdesc,
and made it impossible to override it with FLASH_MAP_SETUP_CONFIG.
2023-03-11 11:43:03 +01:00
david gauchard
32323e55b5
fix library name in library.properties (#8880) 2023-03-06 16:03:45 +01:00
david gauchard
74e02d1a6f
basichttpsclient example: fingerprint handled by update scripts (#8311)
* basichttpsclient example: fingerprint handled by update scripts
2023-03-06 15:05:36 +01:00
M Hightower
be02af0504
Remove stale patch for SDK v1.1 and earlier (#8858)
rts_reg address referenced was not valid for SDK v2.0.0 and up.
rts_reg[30] = 0; cleared storaged used to set TestStaFreqCalValInput.
2023-02-23 01:02:55 +03:00
M Hightower
71a51b1113
Resolve Windows path problems (#8860)
Moved up os.makedirs for ./core/ directory.
Strange problem creating files with file paths with spaces.
Strange that "create file" would work when the path did not contain spaces and the last folder of the path hadn't been created.

Added try/except on main to commit print buffer on traceback for context.

Additional issues with diacritics and locale character encoding for shell vs source code.
build.opt is written with the same encoding as the shell; however, the data read from the Sketch.ino.global.h is UTF-8.

Tested on Windows 10 (en-US) with Arduino IDE 2.0.3 Under an
account with a diacritic character in the user ID path.

Needs testing on Japanese Windows
2023-02-22 20:46:25 +03:00
david gauchard
d7cd4bef6c
make http-server less verbose in debug mode (#8850)
* make http-server less verbose in debug mode
2023-02-05 18:17:28 +01:00
david gauchard
9a3d55c781
Fix String build warning with DEBUG_ESP_PORT but without DEBUG_ESP_CORE (#8849) 2023-02-05 15:35:56 +03:00
Max Prokhorov
badb407bbb
Update SdFat fork (#8844)
SdFat 2.0.2+ doesn't call yield(), make sure we don't trigger SWDT

fix #8822
2023-02-02 18:21:11 -08:00
M Hightower
326be35c88
Postmortem improvements (#8839)
* divide by 0 reporting to point back at the divide function caller
* stack offset adjustments to be independent of __wrap_system_restart_local()'s stack frame size.
2023-02-01 18:57:32 +03:00
GrzegorzWo
1beca6f4da
Fix LowPowerDemo.ino (#8841)
CRC checking of data read from RTC was always true
2023-02-01 18:31:20 +03:00
Max Prokhorov
6dfebec8c5
SdFat -> FS HAL mode fixes & test (#8833)
* re-use SdFat access mode through static const, no need to hard-code our own value w/ cast in the macro
* separate read-modes from flags; read, write and rw are distinct numbers
* simple compile-time tests in .cpp

resolve #8831
2023-01-31 22:28:37 +03:00