100 Commits
Author SHA1 Message Date
Earle F. Philhower, III 6c435c1209 Update platformio.rst 2025-07-11 12:15:15 -07:00
Earle F. Philhower, III f4de3cbd6d Rewrite HTTPClient chunked transfer-encoding (#3034)
* 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
2025-07-11 12:12:46 -07:00
Earle F. Philhower, III 49ada3418f Make default SerialBT FIFO 1K (#3032)
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.
2025-07-09 13:37:33 -07:00
Earle F. Philhower, III 2124367f34 Note obsolete LittleFS upload limitations (#3030)
See #3025
2025-07-07 13:40:56 -07:00
Earle F. Philhower, III a4695734a5 Remove incorrect definiton opn BTT SKR Pico (#3020)
Related to #3018
2025-06-28 18:33:30 -07:00
Earle F. Philhower, III e67b4f69b5 Update README.md 2025-06-28 11:49:43 -07:00
Earle F. Philhower, III 46076d22b9 Remove dead Waveshare RR2040 Plus 16/4M JSON files (#3017)
Just noticed #3016 didn't get rid of the older 2-part JSONs
2025-06-28 11:01:05 -07:00
Earle F. Philhower, III 98419d884e Fix PWMAudio crash when no CB installed (#3012)
Fixes #3011
2025-06-24 12:48:28 -07:00
Earle F. Philhower, III 21f34396ee Typo SPISlave.cpp 2025-06-23 16:44:47 -07:00
Earle F. Philhower, III 8704d9e395 Update to Adafruit_TinyUSB 3.7.0 (#3008) 2025-06-23 16:39:20 -07:00
Earle F. Philhower, III df81f20eb4 Remove duplicated code from SPISlave (#3007)
Use the SPIHelper class already there for the SPI/SoftwareSPI
2025-06-23 15:47:19 -07:00
Earle F. Philhower, III 6fc3165d3a Update version 2025-06-19 18:36:46 -07:00
Earle F. Philhower, III 878271e122 Verify ADCInput buffer sizes legal for 3 and 4 inputs (#2996)
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.
2025-06-16 12:29:12 -07:00
Earle F. Philhower, III f07079bb7d Remove dead debug code in PIOProgram (#2992) 2025-06-12 11:15:12 -07:00
Earle F. Philhower, III e7a23550ce Update to GCC 14.3, Newlib 4.5.0 (#2975)
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
2025-06-12 10:54:37 -07:00
Earle F. Philhower, III 0beb2d4ae8 Add SDIO PIN definitions for Adafruit Metro RP2040 (#2989)
Fixes #2985
2025-06-12 08:16:55 -07:00
Earle F. Philhower, III 948e9bfd22 Clear any existing IP before sending a DHCP request (#2979)
Fixes #2978
2025-05-31 11:20:14 -07:00
Earle F. Philhower, III 73bd6a0891 Send DHCP request on ::begin even if lease exists (#2977)
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
2025-05-31 09:19:42 -07:00
Earle F. Philhower, III f3df355663 Fix BSTstackLib service UUID reporting to client (#2968)
Fixes #2967
2025-05-22 12:34:26 -07:00
Earle F. Philhower, III 7dcfe4d483 Update version 2025-05-22 08:19:51 -07:00
Earle F. Philhower, III 7c51742522 Add PSRAM option for Adafruit Metro RP2350 (#2961)
Fixes #2960
2025-05-16 08:34:01 -07:00
Earle F. Philhower, III 08353deb88 Ignore libpico build dirs for git 2025-05-14 15:00:03 -07:00
Earle F. Philhower, III d5e844b2bd Panic on stack protector crash instead of exit (#2955)
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.
2025-05-14 07:38:25 -07:00
Earle F. Philhower, III 2bc00bef57 Fix ADCInput masking (#2937)
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.
2025-05-05 09:16:29 -07:00
Earle F. Philhower, III 47c2cd2b0b Update version 2025-05-02 08:59:52 -07:00
Earle F. Philhower, III 227d71ed18 Fix RP2350B SPI RX pin list (#2931)
Fixes #2930
2025-04-29 16:29:45 -07:00
Earle F. Philhower, III 5e74bbbbb2 Rewrite SerialPIO receive path, ensure proper edge (#2929)
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);
    }
  }
}
````
2025-04-29 13:39:34 -07:00
Earle F. Philhower, III 8d58a9207f Update LittleFS and Adafruit USB libraries (#2919)
Only very minor changes to the submodules were noted.  Should not have
any effect on this core.
2025-04-18 18:00:56 -07:00
Earle F. Philhower, III bc5b2c24ff Fix rp2040.getCycleCount() from core1 (#2915)
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.
2025-04-18 09:16:36 -07:00
Earle F. Philhower, III 07ea22d877 Generate PWMAudio pacer frequencies for 176/276MHz (#2913)
Overclock settings changed, need to update the precalculated pacer
fractions for PWMAudio.
2025-04-17 08:21:14 -07:00
Earle F. Philhower, III 253e946dcb Update tools README.md 2025-04-17 07:04:26 -07:00
Earle F. Philhower, III 60d28d6c92 Add PIO.h header verification to CI (#2911)
* 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
2025-04-16 14:56:31 -07:00
Earle F. Philhower, III e8bd9daa82 Update version 2025-04-16 13:22:14 -07:00
Earle F. Philhower, III 9747990c16 Fix remaining PICO_RP2350B reference (#2910)
Minor fix to #2898
2025-04-16 08:28:53 -07:00
Earle F. Philhower, III 9ac7892bd6 Update W55RP20 example for proper CS pin (#2906)
Fixes #2903
2025-04-15 08:17:47 -07:00
Earle F. Philhower, III 073094fe0e Update adc.rst for RP2350B 2025-04-15 07:39:17 -07:00
Earle F. Philhower, III 2a46bcfc0f Update contrib.rst
Update the PICO_RP2350A macro usage
2025-04-14 11:41:20 -07:00
Earle F. Philhower, III e05dd50d62 Convert to SDK RP2350A/B determination (#2898)
* 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
2025-04-08 16:02:54 -07:00
Earle F. Philhower, III 54885d79e0 Add explicit using arduino::IPAddress to headers (#2894)
Fix issue with WiFiNINA includes.  Fixes #2887
2025-04-07 10:17:03 -07:00
Earle F. Philhower, III ecf2b2e39f Add WiFi region for Pico2W (#2872)
Fixes #2871
2025-03-19 08:47:12 -07:00
Earle F. Philhower, III 49397a7f3d Update version 2025-03-18 17:03:18 -07:00
Earle F. Philhower, III aabbba67ce Add some Doxygen documentation to core and libraries (#2780) 2025-03-18 17:00:44 -07:00
Earle F. Philhower, III 50b9ea99bd Add Olimex Pico2XL and Pico2XXL (#2868)
Fixes #2820
2025-03-18 16:40:51 -07:00
Earle F. Philhower, III beece2ec9d Add <1MB FS options for multi-size boards (#2867)
Boards with selectable flash sizes only had a 1MB FS as the smallest
option on 2MB boards.  For the normal Pico @ 2MB, though, we supported
filesystems down to 64KB.  Add those same options to the 2MB SKUs
of configurable boards.
2025-03-18 16:29:54 -07:00
Earle F. Philhower, III 1a8735700f Use flash size menu for Olimex boards (#2866)
Remove duplicated boards with just different flash sizes.  Use the flash
size menu to select 2 or 16 MB units.
2025-03-18 15:26:34 -07:00
Earle F. Philhower, III cc1af990b4 Add Pimoroni Servo2040 (#2865)
Fixes #2730 .  Untested, based off of schematics
2025-03-18 15:11:25 -07:00
Earle F. Philhower, III 15d1c6813a Redo UF2 discovery for Windows compatibility (#2853)
Windows Python doesn't seem to kill the worker Thread properly when the IDE
is exited, leading to a) multiple Python3 instances on a PC after many uses
and b) errors updating the core when it tries to re-install Python3 while
still having the older version's EXE loaded and in use.

When an exception happens on the input() call under Windows, it seems like it
can still leave a thread running.  Add one more flag, caught in a global
exception handler.

Works around https://github.com/arduino/arduino-cli/issues/2867
2025-03-14 10:08:37 -07:00
Earle F. Philhower, III cdf0a65d0f Fix invalid overclock speeds 175 and 275 MHz (#2855)
Fixes #2854

Change 175->176 and 275->276 in CPU speed menu to avoid panic when
attempting to set a clock that wasn't exactly possible.
2025-03-13 20:18:50 -07:00
Earle F. Philhower, III e60858c327 Update version 2025-03-11 13:35:52 -07:00
Earle F. Philhower, III bebd1dff50 Update README.md (#2848) 2025-03-11 13:34:08 -07:00
Earle F. Philhower, III 14145e4469 Update to SDK 2.1.2-develop (#2844)
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.
2025-03-11 13:30:17 -07:00
Earle F. Philhower, III 5bfc35caf5 Enable add'l UART_AUX pinouts for RP2350 (#2837)
Fixes #2835.  Thanks @deltaford!
2025-03-05 07:02:32 -08:00
Earle F. Philhower, III 8deb6b9724 Adjust the PSRAM clock when over/underclock F_SYS (#2824)
* 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.
2025-02-26 16:38:52 -08:00
Earle F. Philhower, III 2f82bfd22a Update README.md 2025-02-23 11:36:36 -08:00
Earle F. Philhower, III 31786cdc24 Update version 2025-02-18 12:55:03 -08:00
Earle F. Philhower, III 3d17a56ecf Fix Wire/Wire1 definitions for Xaio RP2350 (#2811)
Fixes #2808
2025-02-18 10:28:12 -08:00
Earle F. Philhower, III 3cb5c315f3 Correct Seeed XAIO RP2350 config (#2803)
Fixes #2801
2025-02-15 16:15:29 -08:00
Earle F. Philhower, III 0148b1469c Update README.md 2025-02-09 09:53:46 -08:00
Earle F. Philhower, III c79e543c41 Move to Arduino API 10501 (#2797)
* 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
2025-02-08 22:45:10 -08:00
Earle F. Philhower, III 5e2fbf324b Update version 2025-02-04 14:34:53 -08:00
Earle F. Philhower, III 79568a3e63 OTA Updater better error codes on OOS (#2793)
Fixes #2785.  Thanks @donmsmall!
2025-02-04 11:54:12 -08:00
Earle F. Philhower, III b506c010f7 Fix I2C on Adafruit Feather RP2350 HSTX (#2784)
Fixes #2783
2025-01-30 12:08:24 -08:00
Earle F. Philhower, III 8c3170596f Deduplicate SPI and SoftwareSPI routines (#2779) 2025-01-28 12:47:13 -08:00
Earle F. Philhower, III acf81f426c Add PIO-based SoftwareSPI enabling SPI on any pins (#2778)
* Add PIO-based SoftwareSPI enabling SPI on any pins

The Raspberry Pi team has a working PIO-based SPI interface.  Wrap it
to work like a hardware SPI interface, allowing SPI on any pin
combination.

Tested reading and writing an SD card using unmodified SD library.

* Add W5500 example

Good for testing, shows non-contiguous pin outs.
2025-01-27 13:59:52 -08:00
Earle F. Philhower, III 84826935a9 Don't set SDFAT_FILE_TYPE, default is OK (#2773)
* Don't set SDFAT_FILE_TYPE, default is OK

Fixes #2772

No need to set SDFAT_FILE_TYPE=3 as that is the defaulr value with upstream
SdFat.  Remove it from platform.txt and platform.io build.

* Codespell got all techy
2025-01-22 10:08:28 -08:00
Earle F. Philhower, III 9480c2a55d Update version 2025-01-21 10:15:08 -08:00
Earle F. Philhower, III e20c973bf5 SDIO doesn't take a clock speed parameter (#2766)
It's fixed by the PIO program and GPIO slew rates encoded in the SdFAT
driver.  Remove the parameter from the SD/SDFS begins.
2025-01-18 09:19:39 -08:00
Earle F. Philhower, III 452ef17174 Replace ESP8266SdFat w/SdFat 2.3.0, SDIO, ExFAT (#2764)
* Replace ESP8266SdFat w/SdFat 2.3.0, add SDIO and ExFAT support

Remove ESP8266SdFat fork and replaces with upstream SdFat to simplify
maintenance.

This 2.3.0 version adds SDIO support and enables exFAT support.
Also upgraded FAT filename support to 256 chars, identical to  LittleFS.

* Add SDIO support to SD and SDFS, documentation, and examples

* Update SD examples to all support SPI0, SPI1, or SDIO
2025-01-17 15:22:39 -08:00
Earle F. Philhower, III 4785c16243 Update to LittleFS v2.10.1 (#2762)
Minor behavior changes WRT path handling with trailing slashes, but
should not affect anything on the Arduino side.
2025-01-17 10:18:32 -08:00
Earle F. Philhower, III 2506b8e1d1 Update to Adafruit TinyUSB 3.4.2 (#2761)
Should be no change, just keeping in pace with upstream.
2025-01-17 10:03:22 -08:00
Earle F. Philhower, III 7bfe25b8aa Remove SDK C++ new/delete, duplicated objects (#2760)
* Remove Pico-SDK C++ exception-override new/delete

We support exceptions on and off, but the cxx_options file in the
SDK implemented a single override to new/delete.

Remove it so we will use GCC's build-in operator new/delete
which will be correct for either option (2 different libstdc++
versions are shipped as part of the toolchain).

* Remove duplicated SDK files

The SDK will link in the same compilation unit in the LWIP builds.
Remove them to shrink the repo size by ~28MB.
2025-01-16 15:02:01 -08:00
Earle F. Philhower, III 0655b7d5b6 Fix ADCInput clocks for multiple inputs (#2755)
When multiple inputs were active, the frequency was being scaled two
times resulting in incorrect sampling speed.  Correct to only scale
the calculation and not the stored value (which is used in `begin`).

Fixes #2754
2025-01-14 15:58:45 -08:00
Earle F. Philhower, III 83b8d122d7 Restore Bluetooth TLV on Pico2/RPiWiFi boards (#2753) 2025-01-13 17:38:51 -08:00
Earle F. Philhower, III ec528d34f8 Remove unneeded SDK files from libpico/etc. (#2733)
Pico-SDK changed the output extension of their compilation from "x.c.obj"
to "x.c.o" meaning the removed Newlib and STDIO SDK wrappers were still
being linked in certain situations.  Update make-libpico Cmakefile to
remove the new names.

Fixes debug `printf` output.
2025-01-03 10:42:47 -08:00
Earle F. Philhower, III 5296241949 Update version 2024-12-31 10:35:02 -08:00
Earle F. Philhower, III d84ff02f03 Allow setting PWMAudio frequency before begin (#2726)
I2S allows setting freq before ::begin, so allow same for PWMAudio.
2024-12-30 10:57:40 -08:00
Earle F. Philhower, III cc2581afd6 Properly wrap AudioBufferManager block writes (#2725)
The memcpy-version of the ABM::write updated the destination and count
but neglected to move the source forward.  If a block write crossed a
frame boundary then the 2nd frame would repeat the data from the first
half of the buffer.

Fix by incrementing the source pointer by the same amount as was written.
2024-12-29 16:26:23 -08:00
Earle F. Philhower, III bb682bbb33 Use the distributed ARM ar in libpico, not system (#2721)
Fixes #508
2024-12-29 10:29:42 -08:00
Earle F. Philhower, III 809beffc8b Add AudioOutputBase keyword 2024-12-27 10:15:05 -08:00
Earle F. Philhower, III fa22c6c627 RTD has its own key for PDF generation 2024-12-27 08:48:39 -08:00
Earle F. Philhower, III 0788a42477 RTD doesn't do formats:PDF, revert 2024-12-27 08:44:58 -08:00
Earle F. Philhower, III d732ac82ba Precalculate common PWMAudio dividers, avoid noise (#2714)
Calculating the DMA clock divider for PWMAudio can take a very long time
because there are 65K floating point divisions required.  But most audio
will be one of a dozen sample rates, so it is possible to precalculate
the rates on the host and use a small lookup table to avoid any math at
all.  Removes occasional scratching in PWMAudio when the BackgroundAudio
library changes sample rates.
2024-12-22 14:05:44 -08:00
Earle F. Philhower, III 5fb5e16be8 Add real block write for AudioRequestBuffer (#2712)
Optimize AudioRequestBuffer writing when large blocks are available (i.e.
I2S writes of full MP3 or AAC frames in BackgroundAudio).  Update I2S to use
the new call.  Reduces 1152 calls to arb::write() to a single call/return
and optimized memcpy in that case.
2024-12-21 14:15:40 -08:00
Earle F. Philhower, III 45c0b3a1b4 Move MacX86 runner up to new minimum spec (#2711)
The MacOS12 runner is dead, so move up to the lowest version still available for CI.
2024-12-21 10:27:44 -08:00
Earle F. Philhower, III a13d236afd Update fs.rst 2024-12-19 07:00:59 -08:00
Earle F. Philhower, III 2f99b0ae2f Update version 2024-12-18 17:51:11 -08:00
Earle F. Philhower, III eecbcdf59a Derive playback devices from common AudioOutputBase (#2703)
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.
2024-12-18 12:19:40 -08:00
Earle F. Philhower, III f1b965f704 Allow I2S constructor to set pins, like PWMAudio (#2702)
Pins are a physical connection, makes sense to define them at construction.
2024-12-18 10:06:54 -08:00
Earle F. Philhower, III 66af359578 Remove unused variable from AudioBufferManager class (#2701) 2024-12-18 07:06:40 -08:00
Earle F. Philhower, III d65b030644 Add PDF output to readthedocs.yaml (#2700) 2024-12-18 06:48:47 -08:00
Earle F. Philhower, III 33b126836f Support setting channel for SoftAP (#2695)
Fixes #2694
2024-12-17 08:34:14 -08:00
Earle F. Philhower, III def00bac66 Fix ordering of boards in menus (#2696)
Been a little cruft in the order of boards, rearrange alphabetically.
2024-12-16 19:45:30 -08:00
Earle F. Philhower, III 21a767e7e4 Semihosting part of core, RISC-V support (#2685)
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
2024-12-14 09:42:45 -08:00
Earle F. Philhower, III a02e188fc7 PWMAudio setFrequency optimization (#2683)
If we set the frequency to the same one running, no need to do anything.
2024-12-13 08:04:50 -08:00
Earle F. Philhower, III e56a295e34 Add MDNS.addServiceTxt() to SimpleMDNS (#2679)
* Add MDNS.addServiceTxt() to SimpleMDNS

Fixes #2678

A simple mapping allows for basic service text addition even when using
SimpleMDNS and ArduinoOTA.

* Protection against duplicate services addition
2024-12-12 11:55:14 -08:00
Earle F. Philhower, III 5b4dff9a77 Add optional callback parameters for I2S/PWMAudio (#2677)
Like GPIO interrupts, allow the user to pass in a callback data pointer.
2024-12-11 14:53:54 -08:00
Earle F. Philhower, III 0061d3f97f Enable gprof onboard profiling (#2669)
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.
2024-12-05 17:30:45 -08:00
Earle F. Philhower, III 48bc91af36 Update semihosting.rst typo 2024-12-04 16:33:46 -08:00
Earle F. Philhower, III 1725e2109f Add semihosting support (SerialSemi and SemiFS) (#2670)
Enable ARM-only semihosting mode.  This mode allows applications on the
Pico to write to the OpenOCD console and read and write files on the
host system (i.e. debugging dump information, etc.)

It is not very fast because of the way it uses breakpoints on the Pico
to communicate, but it is useful in cases when you want to get a single
file off of the Pico while debugging.

Note that this **requires** a connected OpenOCD and GDB or else the
semihosting will cause a system panic.
2024-12-04 16:07:46 -08:00
Earle F. Philhower, III f2d30abb1c Add -O0 optimization mode to menus (#2667)
GCC will still do several optimizations in -Og mode which can make it hard
to see local temporary variables.
2024-12-03 16:11:56 -08:00