1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-18 12:24:04 +03:00

4451 Commits

Author SHA1 Message Date
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
david gauchard
d7da591ed8
Revert ESPSoftwareSerial from v7 to v6
7.0.0 includes a breaking change to onReceive callback
https://github.com/plerup/espsoftwareserial/releases/tag/7.0.0
2023-01-30 18:23:57 +03:00
Max Prokhorov
e25f9e9578
Safeguard for Ticker internal storage that may be changed during callback execution (#8820)
Temporarily move callback into the function scope and execute it from there.
Detaching would no longer destroy it, and re-scheduling would no longer be almost immediately cancelled by our code.
2023-01-26 15:50:14 +03:00
david gauchard
9c4a1239da
String: informative messages on issues (#8821)
Always enable messages when serial debug port is enabled
Allocation issue was not reported
2023-01-26 14:45:09 +03:00
Max Prokhorov
79dde219c5
Don't use -g++ or -gcc suffixes in command line arguments (#8829)
It may confuse some greedy parsers matching compiler either with a glob
or by iterating each argument and not stopping on the first one

ref. this library used by VSCode Arduino extension
ce12578557/src/ParserGcc.ts (L63-L68)

fix #8809
2023-01-26 14:20:17 +03:00
david gauchard
a9675ca837
emulation on host: fix UDP seek&peek (#8827) 2023-01-24 13:44:50 +01:00
M Hightower
cf24024292
New handling of missing perferences.txt in mkbuildoptglobals (#8814)
* Only rely on `perferences.txt ` when requested
* Always assume shared `core.a` caching is in use
* Ignore the passed-in IDE version. Too often, the value is not correct
2023-01-22 11:19:38 +03:00
koliwbr
bed2fa339d
HTTPClient example: Fix typo (#8819)
fix from [HTTP} to [HTTP]
2023-01-20 15:47:42 +01:00
Max Prokhorov
56107fb1f9
Properly handle u8 pointers when assigning and comparing (#8818)
* simplify ctors and operator=, use a common code paths instead of special handling here and there
* fix u8->u32 casts, copy before using u8 data
* do not use raw_address() internally
2023-01-20 12:26:12 +03:00
M Hightower
41c2be2068
Fix mkbuildoptglobals script not finding preferences.txt (#8812)
Also fixes os.utime usage on windows, as it does not accept file descriptors instead of file paths
2023-01-19 00:34:14 +03:00
Edan Schwartz
39b41379ee
Log all exceptions in upload.py (#8813)
Currently some exceptions cause a exit code 2, but without any relevant error message.

As an example, I had an issue with my USB drivers. But the only message I saw using the Arduino IDE was: uploading error: exit status 2. With this code change I could see a more specific Resource busy error message, which helped me identify the actual problem.
2023-01-18 05:16:48 +03:00
Max Prokhorov
6af463baaf
Back to 3.2.0-dev (#8807) 2023-01-15 02:47:00 +03:00
Max Prokhorov
0e5d358c3c
Version 3.1.1 (#8806) 3.1.1 2023-01-15 02:01:02 +03:00
Max Prokhorov
6033ed35d5
Use subprocess.run in elf2bin (#8799)
Properly handle Popen object, it takes care of everything we need to do like .communicate() and handle timeouts. Introduce a small timeout to run so we also know when that happens
Clean-up with pythonic path join and formatting through f"" strings
2023-01-15 00:59:33 +03:00
david gauchard
39080e317e
delay / esp_delay: transparently manage recurrent scheduled functions (#8802)
Recurrent scheduled functions will always be running in background.

esp_delay()'s interval (intvl_ms) is internally kept to its highest value allowing to honor recurrent scheduled functions requirements.

It transparently allows to keep with the arduino and nonos-sdk trivial programming way and still use background services or drivers running regularly.
2023-01-14 22:25:57 +01:00
Max Prokhorov
e1c4a6c8e6
Portable python fix for mkbuildopts (#8804)
see #8226
mentioned in #8803
2023-01-14 21:22:28 +03:00
Max Prokhorov
840ef78237
Fix C builds (#8795)
Missing stdbool.h for 'bool' in features .h, at least one user is arduinoWebSockets
Adds minimal headers sanity-check script to verify that C builds work as expected

Also noticed and removed default argument from crc32() in internal .h that may be used in .c
(not sure how extern C & default worked simultaniously, but at least in our .cpp Gcc somehow figured out it is a no overload solution)
2023-01-11 03:48:30 +03:00
M Hightower
7e2da8b25b
Typo in EAP patch (#8797)
NONOSDK22x_191124 -> NONOSDK22x_191024
2023-01-09 21:36:26 +03:00
Max Prokhorov
df59774eb5
Pointer<->Int casts are not constexpr (#8796) 2023-01-09 21:07:57 +03:00
Earle F. Philhower, III
c8dcdede34
Remove 400b stack allocation from AdvWeb example (#8793)
The AdvancedWebServer.ino example allocated a 400 byte char array on the
stack which, in the case of the example, will work but in general is a
dangerous thing to show new users to try.

Instead, use a StreamString to generate the string on the heap.
2023-01-07 10:01:56 -08:00
Max Prokhorov
a76852a991
Fixup and hedgedoc (#8792) 2023-01-06 16:18:49 -08:00
david gauchard
a79b8f219c
fix printf format in updater debug messages (#8791) 2023-01-07 00:31:01 +01:00
Earle F. Philhower, III
a276195731
Document updating the GitHub deployment keys (#8790) 2023-01-07 00:17:29 +01:00
david gauchard
3212f15cef
back to dev (#8789) 2023-01-06 23:39:04 +01:00
david gauchard
8ae300d476
release 3.1.0 (#8788) 3.1.0 2023-01-06 22:06:06 +01:00
metarutaiga
66ecc33916
Move C++ constructor and destructor tables from .bss to .irom0 (flash) (#8737) 2023-01-05 17:33:00 +03:00
Max Prokhorov
f06710eb6e
hostByName timeout fixes (#8787)
* single impl
2023-01-05 14:29:14 +01:00
piotrcurious
3e357f32b1
Allow passing beacon interval to SoftAP config (#8695)
allow passing beacon_interval to the softAP
2023-01-05 09:54:05 +01:00
BackLogers
3f394616a6
Passing custom HTTPClient to HTTPUpdate (#8773)
This enables passing additional headers to HTTP query.
Based on ESP32 HTTPUpdate functionalities.
2023-01-05 09:38:12 +01:00
david gauchard
7cfb551f90
PHY status API for ethernet drivers (#8784)
* PHY status API for W5500 & ENC28J60 drivers
* move linkStatus() from ArduinoEthernet:: to LwipIntfDev::
* LwipIntfDev: include PHY status into ::connected()
2023-01-05 09:23:57 +01:00
Earle F. Philhower, III
c9f90a3ed3
Update to LittleFS 2.5.1 (very minor update) (#8786) 2023-01-04 14:48:57 +01:00
david gauchard
5a3da9a7d8
Fix Stream::parseFloat() (#8785)
cherry-pick updates for Stream::peekNextDigit() from AVR implementation: decimal dot is optionally allowed
2023-01-03 22:14:10 +03:00
Max Prokhorov
204d2c93a7
NONOS SDK clean-up (#8770)
Remove nonos-sdk-v2.2.0-28-g89920dc aka 3v0, since we have a real v3
Remove 3.0.0...3.0.4 to reduce overhead in maintaining a bunch or binary patches
Update our docs and menu opts to mention 'experimental' status

Old versions still remains in git history, so anyone wanting to play around with 3.0.x could still make use of that work
2023-01-03 01:40:53 +03:00
Dirk O. Kaar
3f1d608a19
EspSoftwareSerial release 7.0.0 with fix for compiler error (constexpr instance member function) and Rx IRQ callback (#8781) 2022-12-31 10:55:37 -08:00
M Hightower
137d421fdd
Fix flashinit panic not printing (#8762)
* fix panic not printing

* improve panic to accept 0 lineno

* always present detailed error message

* Added back lost edit

* For SDK v3.0+, adjust conditional build to remove duplicate call
to flashinit from user_init.
2022-12-22 19:13:01 +03:00
david gauchard
edfde6ba1a
lwip2: cleanup logging and use newlib printf (#8769)
https://github.com/d-a-v/esp82xx-nonos-linklayer/pull/61
2022-12-21 11:35:23 +03:00
M Hightower
4a639ab015
Added missing DRAM fallback to pvPortCallocIram, pvPortZallocIram, and (#8765)
pvPortMalloc(,,,true) case. Improved comments.
2022-12-19 20:51:12 +03:00
M Hightower
59b5bbab7a
Resolve flash address issues with SDK v3.0.0 (#8755)
* Reslove flash address issues with SDK v3.0.0

Fix EEPROM vs RF_CAL flash address conflict. The EEPROM address and
RF_CAL address were the same.

Add support for Flash size: "Mapping defined by Hardware and Sketch"

Change at_partition_table static from dynamic to static.

* Cleanup and improve comments

* Improve flash size and partition error reporting/indication

Changed set_pll() to mmu_set_pll() and made available for debug builds
and other settings where required.

Provide more checks and feedback in the debug builds and
trim code for production.

* Now supports FLASH_MAP_SUPPORT with SDKs v3.0

RF_CAL and system_parameter always occupy the last 5
sectors of flash memory.

* cleanup and refactoring
comment cleanup

* Add more build issolation when including flash_hal.h

* Improve details for autoconfig fail.

* requested changes
2022-12-19 19:44:26 +03:00
Krzysiek S
b565b8686d
Optimize disconnect method in WiFiSTA class (#8760) 2022-12-16 14:22:26 +01:00
Max Prokhorov
eda64f69a7
Stack decoder script (#8661)
* stack decoder
* +x
* cut here
* last alloc explain, line breaks
* capture
* print ctx line
* ...and dont ignore sp
* non-hyphenated arg for elf, toolchain path to bin/

either for when tools are already in PATH
or, using `pio pkg exec --package toolchain-xtensa python decoder.py ...`
(where package is a full version spec for pio registry)
2022-12-16 12:27:43 +01:00
Max Prokhorov
9dce0764af
Don't return true with WiFiClientSecureBearSSL::connected() when really disconnected (#8330)
* Don't return `true` with WiFiClientSecureBearSSL::connected() when disconnected

Apply the same condition as with normal WiFiClient - we are not connected
when it's not possible to both write and read.

Implement separate methods for actual connection status and the internal
ssl engine status and update methods that were previously using available()
for this purpose

Update examples to check available() when the intent is to only read the
data and not interact with the client in any other way. Also, use connect()
as a way to notify errors, no need to check things twice
2022-12-16 12:12:58 +01:00
M Hightower
4a0b66b017
Heap addendum to handle changes in NON-OS SDK 3.0.x (#8746)
## WPA2 Enterprise connections
References - merged PRs:
* https://github.com/esp8266/Arduino/pull/8529
* https://github.com/esp8266/Arduino/pull/8566 - these occurred with connect/disconnect with WPA-Enterprise
* https://github.com/esp8266/Arduino/pull/8736#issue-1470774550

The NON-OS SDK 3.0.x has breaking changes to the [`pvPortMalloc`](bf890b22e5/include/mem.h (L42)) function. They added a new `bool` argument for selecting a heap. 
```cpp
void *pvPortMalloc (size_t sz, const char *, unsigned, bool);
```

To avoid breaking the build, I added a new thin wrapper function `sdk3_pvPortMalloc` to `heap.cpp`. 
Edited new SDK LIBs to call `pvPortMalloc`'s replacement `sdk3_pvPortMalloc`.

They also added `pvPortZallocIram` and `pvPortCallocIram`, which are not a problem to support. Support added to `heap.cpp`.

Issues with WPA2 Enterprise in new SDKs:
* v3.0.0 and v3.0.1 - have the same memory leak and duplicate free bugs from before
* v3.0.2 through v3.0.5 - have the same memory leak; however, _no_ duplicate free crash.
* memory leak can be seen by cycling through setup, connect, disconnect, and clear setup - repeatedly.

Updated `wpa2_eap_patch.cpp` and binary patch scripts to handle v3.0.0 through v3.0.5.
Patched SDKs v3.0.0 through v3.0.5

## Duplicate Non-32-bit exception handler
Issue: At v3.0.0 and above `libmain.a` supplies a built-in exception handler (`load_non_32_wide_handler`) for non-32-bit access. Our non-32-bit access handler (`non32xfer_exception_handler`) overrides it. 

Solution: Add "weak" attribute to symbol `load_non_32_wide_handler`. Adjust the build to default to the SDK's built-in non-32-bit handler.  If there is a need to use our non-32-bit handler, make the selection from the Arduino IDE Tools menu `Non-32-Bit Access: "Byte/Word access to IRAM/PROGMEM (very slow)"`.

With SDKs v3.0.0 and above a "non-32-bit exception handler" is always present.
2022-12-16 11:11:19 +03:00
Krzysiek S
d3c8d272d7
Add eraseap option to WiFi disconnect method. (#8758)
Add eraseCredentials option to WiFi disconnect method (legacy default: true)
2022-12-15 10:30:29 +01:00