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.
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
Call `rp2040.enableDoubleResetBootloader()` anywhere in the code to
enable the check. W/o that call, the checker will be linked in.
See #892
CORE1 doesn't start until well after the C runtime initialization,
so the flag won't be overwritten.
Also increase timeout to 350ms because OTA bootup can be
slow.