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
* 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.
* 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
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.
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
* 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
* 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
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.
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
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.
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)
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.
* PHY status API for W5500 & ENC28J60 drivers
* move linkStatus() from ArduinoEthernet:: to LwipIntfDev::
* LwipIntfDev: include PHY status into ::connected()
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
* 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.
* 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
* 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)
* 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
## 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.