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
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.
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
* Convert to SDK RP2350A/B determination
Fixes#2878
The SDK uses `defined(PICO_RP2350) && !PICO_RP2350A` to indicate an RP2350B
chip, not the define PICO_RP2350B.
Match the SDK's usage by converting from `defined(PICO_RP2350B)` to
`defined(PICO_RP2350) && !PICO_RP2350A` and update the chip variants
accordingly.
* Need to explicitly override PICO_RP2350A for all
The *SDK*'s board definition file hardcodes a PICO_RP2350A value for
all boards, but we use the same board file for both A and B variants.
Override the SDK board definition in the variant definition file.
* Generic RP2350 needs 2-stage PICO_RP2350A setting
Also ensure SDK board definition included before pins_arduino.h for
clearing up redefinition errors.
* Factor out undef PICO_RP2350A
* Update Arduino.h
Supercedes #2815
Move to pico-sdk official develop branch which includes a necessary
IRQ header fix.
200MHz is now default for the Pico, but 133 is still available from
the menus.
* Adjust the PSRAM clock when over/underclock F_SYS
Fixes#2818
* Need to increase PSRAM divider before sysclk increase
Per datasheet, when increasing sysclk speed we need to set the qmi
clocks first and do a dummy transfer to ensure no invalid speed
operations happen on the bus. Handle the logic for this while setting
up the overclock.
* Move to Arduino API 10501
Track upstream Arduino API headers
* IPAddress V4/V6 compatiblity restored
* Fix WiFiUDP includes
* String differences in example
* HardwareSerial using exported
The audio output objects all have the same general necessary configuration
calls. Abstract them out to a generic AudioOutputBase interface class that
they will inherit from. Simplifies letting applications use different
output channels.
Should be backwards compatible with existing code.
Semihosting is handy for debugging, so allow the core to use `SerialSemi` as the
::printf port. Add menu item to the IDE to allow selection.
Add RISC-V implementation of semihost call
Adds a menu item to enable onboard profiling. This requires significant
RAM and really only makes sense on devices with PSRAM to store the state.
When the menu item is selected, allocates RAM and tracks function calls and
periodically samples the PC to generate a histogram of application usage.
The onboard gmon.out file can be written over Semihosting or
some other way to transfer to a PC for analysis.
Adds a profiling example with command lines.
Using pico-sdk develop branch, add in support for CYW43-based
WiFi/BT/BLE boards on the RP2350 such as the
SparkFun Thing Plus RP2350 or the Pimoroni Pico Plus 2W.
Fixes#2608
Rolls in dynamic SPI divider #2600
* Support LED digitalWrite on RP2350+CYW
Also move "special GPIO" to 64 since the Pimoroni Pico 2W uses the
RP2350B with 48 GPIOs.
* Enable CYW43_PIN_WL_DYNAMIC in IDE and P.IO
Allows calling `cyw43_set_pins_wl(cyw43_pin_array);` to redefine the
CYW43 hookup in the variant initialization.
The RP2350 boot ROM seems to randomize memory on a HW reset, including
both CPU stacks where we normally stuff the "reset to bootloader" flag.
Update the docs and source to remove rp2040.enableDoubleResetBootloader()
on RP2350-based boards.
Fixes#2606
Remove old pre-release BTStack files from sdkoverrides (were needed for
compound BLE devices, but the latest BTStack now incorporates these
changes).
Fixes#2547
* Workaround PSRAM cache invalid'n by reading flash
Fixes#2537
While waiting for a working direct cache flush routine, try and force the
cache to evict all PSRAM values by reading a bunch of flash addresses (which
share the XIP cache). This hurts performance when PSRAM is not used, but
is required for correctness until we have a working XIP flush.
* Invalidate after cleaning the cache line
gmx from the RPI forums came up with this hack and it seems to work!
https://forums.raspberrypi.com/viewtopic.php?p=2262371#p2262371
33% faster for 4K memcpy using DMAMemcyp example
With this assembly:
CPU: 4835 clock cycles for 4K
DMA: 2169 clock cycles for 4K
Using stock Newlib memcpy:
CPU: 7314 clock cycles for 4K
DMA: 2175 clock cycles for 4K
The flash ROM routines seem to overwrite the QMI configuration we set for
PSRAM, rendering it unreadable after any erase or write or ID command.
Wrap the 4 flash control functions to preserve the QMI state on the
RP2350. On the RP2040, simply pass through the call.
Fixes#2537