* Rewrite HTTPClient chunked transfer-encoding
Fixes#3029
The chunked decoder seems to have had some race conditions resulting in
lost data.
The HTTPClient::getStreamPtr returned the raw WiFiClient which included
all of the chunked block size markers, requiring the user to manually
parse the chunked encoding.
Remove the existing chunked handling, add a HTTPStream as a WiFiClient
subclass. The HTTPClient will return this HTTPStream which will always
properly cut out chunk markers when present (and pass things raw for
non-encoded streams). Use this new HTTPStream class to replace the
existing handling in HTTPClient
Update the fingerprint in the StreamHTTPSClient example because their
cert was updated.
* Astyle
* Add block write passthru
* Add other WiFiClient passthru calls
BT SPP doesn't have backoff and we can receive long
messages. If there's not enough memory to store them
then they will be truncated.
Increase the default space to 1K to help avoid this issue.
* Add Waveshare RP2350 Plus
* Refactor to use flash size menu
Replaces separate board entries for Waveshare RP2350 Plus 4MB and 16MB variants with a flash size menu.
Related to #2991, the ADCInput bufferWords needs to be a size that always
has the 1st ADC sample at offset 0:0. For 1 and 2 inputs that's guaranteed.
For 3 inputs we need a multiple of 3 words to ensure things always align
in the case of overflow. For 4 inputs, a multiple of 2 words is needed.
Moves to just released GCC 14.3
Moves to full-fat printf/scanf because Newlib no longer supports all the
calls libstdc++ requires with the older, smaller, nano-formatted-io option.
Moves to latest SDK develop branch with important float acceleration fixes
for the RP2350, among other updates.
Moves to latest pioasm, picotool develop branches
* SDK was refactored, update the includes
* Rebuild PicoSDK and BearSSL libs
* Update certs in BSSL validation example
* Don't spell check the certs!
* Updated tools with full fat++ newlib printf/scanf
Prevents weird update errors stemming from an already installed platform
(cached), then updating some files in it manually and then pio pkg updating it.
When a link comes up, we were only sending a DHCP request if the existing
netif's ipaddress was 0. When a DHCP lease is acquired at first that IP
is changed to the given address, and if we do another ::begin we wouldn't
dhcp_start to send a new request and use the old one (until its lease
expired).
In the case of network changing (i.e. WiFiMulti on different nets or
moving an Ethernet cable to another router) that old address would not
be valid.
Track if an IP address has been manually set and use that to determine
if DHCP needs to be re-requested instead of looking at the old netif's
ipaddress.
Fixes#2974
Newlib has a stack protector fail handler which write(2)s a
message to STDERR which doesn't work here. Override with a
call to panic().
Tell GCC to protect all functions for stack protection instead of
ones that it heuristically decides need protection. Slower but
safer, and only when stack protection is enabled.
* Update pins_arduino.h
Changed PIN_LED to match USERLED on PCB. Removed unavailable pins from SPI0 connection.
* Update pins_arduino.h
Uncommented SPI0 pins and reassigned them over GPIO 2,3,4,5.
Fixes#2935
The PICO_2350A patch flipped the logic of the ADCInput bitmask calcs
causing the 2040 and 2350A to use bitmasks for the 2350B (i.e. wrong
GPIOs) and vice versa.
The SerialPIO(SoftwareSerial) receive path was convoluted and required
a lot of work on the host to get the actual data out. It also wasn't
always sampling on the proper edge leading to errors whenever clocks
or hold times shifted slightly.
Rewrite the SerialPIO RX path to explicitily wait for start bit,
pause 1/2 bit time, then idle for a full bit time for all bits.
Takes more PIO instruction memory but works flawlessly even with
mismatched clocks.
Tested with a loopback from HW UART to SW UART with a 5% clock
mismatch @ 19200 baud without reception errors, whereas the
original code would fail with less than a 0.5% variation.
Fixes#2928
````
SoftwareSerial s(15, -1);
void setup() {
Serial1.setTX(0);
Serial1.begin(19200 + 1920/2, SERIAL_8N1);
s.begin(19200, SERIAL_8N1);
}
void loop() {
Serial.println("---");
Serial1.write("Had we but world enough and time", 32);
uint32_t now = millis();
while (millis() - now < 500) {
while (s.available()) {
auto c = s.read();
Serial.printf("%02x '%c'\n", c, c);
}
}
}
````
Fixes#2914
There are 2 systick units, one per core. Set up and start core1's
systick unit and track each core's epoch separately.
Document a method of preserving 100% user-only code on core1
and add a core1_disable_systick boolean flag that works like the
separate stack one.
* Add PIO.h header verification to CI
Ensure all PIO .pio.h headers match the .pio sources in the tree
* Install all tools for Style check
* Clean up mismatched PIO headers
No functional changes, but the PDM pdm.pio file did not init a data pin
while the pdm.pio.h (the one actually used in the core) did. Correct to
match.
* No need for submodules in the style check