Change libpico.a to build with PICO_XOSC_STARTUP_DELAY_MULTIPLIER=64 #315
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some samples of some Adafruit boards need a longer XOSC startup delay. We diagnosed this a while ago and PR'd a change to
pico-sdk
that adds a new compile-time constantPICO_XOSC_STARTUP_DELAY_MULTIPLIER
, which allows lengthening the XOSC delay.arduino-pico
uses a single build oflibpico.a
for all boards. To accomodate the Adafruit boards, this PR setsPICO_XOSC_STARTUP_DELAY_MULTIPLIER=64
for the build, and provides a newly builtlibpico.a
. The extra delay is still quite short, and shouldn't interfere with normal startup.I tested this on an Adafruit QT Py RP2040 that is known to need a longer startup time. THe board would not run after a power cycle or reset before this fix, and now it works fine.
See raspberrypi/pico-sdk#457 and raspberrypi/pico-sdk#401 for some background on this problem.
@earlephilhower I am not sure of your workflow for rebuilding
libpico.a
withmake-libpico.sh
. I builtlibpico.a
manually withmake-libpico.sh
inside.arduino15
using the lastest pico BSP, and then copied it into the commit for this PR. I had to do some manual fiddling with myPATH
to make sure to use the compiler you include in the BSP. Themake-libpico.sh
script assumes the correctarm-none-eabi-gcc
is onPATH
, and also looks for tools insystem
, though mysystem
only includessystem/placeholder
. So I had to set things up manually to make the script work.Tagging @ladyada for FYI.