* 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
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.
* Add support WiFiClientSecure TCP KeepAlive
* Make TCP keepalive and related functions virtual.
* Make TCP keepalive and related functions override.
Fixes#8939
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.
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.
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)
* 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.
* 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
* 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.
* 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
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.
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.
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)