Improve resume speed by passing in last known BSSID
Provide a simpler example for WIFI_SHUTDOWN/WIFI_RESUME
Add documentation for WIFI_SHUTDOWN and WIFI_RESUME.
* Fix ESP8266SdFat architecture
Avoid problems reported in
https://forum.arduino.cc/index.php?topic=726897.msg4889319
* Fix Windows CI, python3 now *maybe* exists
Python3 used to be called "python.exe" on earlier VMs, but it looks like
the image has been updated and a "python3.exe" does now exist. Update
the CI script to first check it "python3" exists, and if not then do the
copy hack, OTW do nothing.
RODATA can be copied automatically by the bootrom, so no reason not to
allow its use for strings and constants in eboot.c
Revert to pfalcon's original uzlib since the single patch to remove
RODATA is not required.
Rationalize eboot.ld linker script, clean up BSS and init it in code.
Saves 112 bytes of space in the bootloader sector by removing the
extra code associated with literal loads.
* Move CRC out of bootload sector
We added protection to only erase the bootload sector when flashing an
image when the new sector != the old sector. This was intended to
minimize the chance of bricking (i.e. if there was a powerfail during
flashing of the boot sector the chip would be dead).
Unfortunately, by placing the CRC inside the eboot sector *every*
application will have a unique eboot sector (due to the crc/len), so
this protection doesn't work.
Move the CRC into the first 8 bytes of IROM itself. This frees up extra
space in the boot sector and ensures that eboot won't be reflashed
unless there really is an eboot change.
Update newlib to enable the __ieee754_remainder(f) calls required by
std::remainder and others.
Add device test for std::remainder variants.
Fixes#7845
Fatfingered the 32-bit Windows pointer to the Python interpreter. Our
CI and my own testing missed due to being on 64-bit Windows.
For 2.7.4 release, I'll add a file of the appropriate name to the
release for now, but this will correct things for 3.0.0 and forward.
A couple board types reported ESP8266_GENERIC instead of their proper
types in boards.txt (and in defined generated therefrom/etc.).
Give them proper board types based on their names, like other modules.
* allow to set pin to OUTPUT_OPEN_DRAIN in analogWrite
* remove parameter with default value
* Update core_esp8266_wiring_pwm.cpp
* update documentation accordingly
Add basic 24 bit mode to the I2S API with a i2s_set_bits() call.
By default 16b mode is still used, but if i2s_set_bits(24) is run
before i2s_begin() then the HW will drive 24-bits of data. This
data must be left-aligned (i.e. bits 31..8) in 4-byte samples.
Fixes#5244 (the HW doesn't support 8 or 32 bits, only 16 or 24).
* Allow specifying waveform generator in source code
Allows code to explicitly specify which waveform generator it wants,
without needing to use one of the 100 IDE menus or adding a `-D`
compile-time define.
Uses weakrefs to allow for apps to call `enablePhaseLockedWaveform();`
within their `setup()` (or anywhere, really) and have the phase locked
versions override the default waveform generators automatically.
For example:
````
void setup() {
// Uncomment following line to use phase-locked waveform generator
// enablePhaseLockedWaveform();
Serial.begin(115200);
pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output
analogWriteRange(1000);
}
void loop() {
analogWrite(LED_BUILTIN, 100);
delay(1000); // Wait for a second
analogWrite(LED_BUILTIN, 900);
delay(2000); // Wait for two seconds (to demonstrate the active low LED)
}
````
Also adds an example showing it's use.
Address @dok-net's comments and also remove the _weak/_bound version of
startWaveform() since it's invariant of the actual waveform generator.
* Add inline always option to HeapSelect
* Add option to force DRAM for pvPort... APIs
* revert print_loc premature change
* Renamed macro to be more specific, FORCE_ALWAYS_INLINE to FORCE_ALWAYS_INLINE_HEAP_SELECT
Added replacement for the Boot ROM `_xtos_set_exception_handler`
to handle installing our replacement `_xtos_c_wrapper_handler`.
Simplified install in the non 32-bit exception module to make use of the
improved `_xtos_set_exception_handler`
Reorganized and improved comments.
If a server returns "HTTP/1.x -8 OK", for example, it can misguide an application developer into freeing less-important memory so the request can be retried and succeed, when the problem is in the server.
_returnCode is never used anywhere else, but it could still contain a negative value returned by a broken server and therefore could cause troubles in the future (if _returnCode is in fact used)
Fixes#6410
We actually provide a function prototype for `analogReference()` in
`Arduino.h`, but no implementation. Add a dummy one that only supports
DEFAULT (like other Arduino boards).
resets. It seems you should not use input registers for scratch registers.
Add an extra output register instead. No code size increase.
Light refactoring for readability
Added "C" reference code for Extended ASM
Save two cycles by loading a0 early in exc-c-wrapper-handler.S
Use optimization O2
Net change in size, 0 bytes with optimization. Save 4 bytes w/o Optimization.
With changes and "O2" save 3 cycles on write and 6 cycles on read.
Make verify fail more visible.
Updated example irammem.info to show performance and test int16 handling
when IRAM is used.
Removed 4K performance test. It didn't show any new information over the 1K test.
The FSMs that drive the encryption logic are not performance critical,
but they are very large. Build BearSSL using -Os on them, leaving -O2
everywhere else (i.e. encryption) for speed.
Saves 1-2KB of flash for SSL applications.
When a file upload ends in \r\n (i.e. a Windows formatted text file) the
sequence of bytes on the wire is `\r\n\r\n----...boundary-marker...`.
When the FSM in Webserver was evaluating the stream, that 2nd `\r` would
be written as valid data and the FSM parser would be reset and see `\n`
as the 1st character, which wouldn't match. This would a) add an extra
`\r` to uploaded files, and b) cause uploads to hang.
Fix by checking on a header FSM mismatch if the next character input
could possibly match our marker, and if so handle it properly.
Fixes#7803
Thanks to @mcspr. Make sure the cached toolchain is only valid when the
package.json file is identical. Also, add the Arduino IDE to the cache
to avoid re-downloads.
* Update to upstream SdFat 2.0.2
Increases the read/write performance for SD card accesses
by a significant amount, up to 5x (3+MB/s) in testing.
Fixes#7772
* Add SDFS::availableForWrite handler
Peek into the sector cache to determine the maximum number of
bytes that can be written w/o needing a (slow) SD operation.
Fixes#7650
* Upgrade to upstream newlib 4.0.0 release
Includes 64 bit time_t and 5 years of updates.
Binary incompatible with libraries which use time_t (due to the size
difference). Recompiling with the new newlib should be sufficient for
most libraries, assuming source is available.
* Remove tools/sdk/libc directory, it isn't used anywhere
Somewhere along the line the copy of libc in tools/sdl/libc was taken
out of the build process. Files in there are not used, take add'l time
to build and install on a toolchain release, and just cause confusion.
Remove them.
* Fix 64-bit time for LittleFS
The core was setting 64-bit times automatically on new file creation or
updates, but would fail when attempting to read them back due to 64/32b
confusion.
Now attempt to read 64b time, and if that fails fallback to reading 32b
time to allow both old and new FS to preserve timestamps.
* Update to jjsuwa-sys3175 additions to GCC and newlib
@jjsuwa-sys3175 contributed multiple patches to GCC, included in
the toolchain, as well as a slightly faster pgm_read_byte() macro.
* Rebuild w/addl GCC patches, new BearSSL flags
* Remove copied libgcc.a file, is contained in toolchain
This commit adds W5500 W5100 and ENC28j60 drivers from @njh with credits
They are available in libraries/
An example is added in W5500 examples directory
plus:
* Extract dhcp server from lwip2 and add it to the core as a class.
It must always be present, it is linked and can be called by fw on boot.
So it cannot be stored in a library.
* ethernet: static or dhcp works
* PPPServer: example
* bring WiFi.config() to the lwIP generic interface (argument reorder common function)
* move hostname() from WiFI-STA to generic interface
* remove non readable characters from dhcp-server comments
* dhcp-server: magic_cookie is part of bootp rfc
* fixes from https://github.com/d-a-v/W5500lwIP/issues/17
* enable lwip_hook_dhcp_parse_option()
* +ethernet tcp client example in w5500 library examples
Fixes#7775
Clean up the passing/setting of custom File time callbacks and add a
host test verifying they work. Existing core was not passing custom
timeCallbacks set at the FS level down to open()ed files, resulting in
them calling the default time(nullptr) and reporting wrong file modify
times.