avoid calling find_package for pico-sdk-tools over and over again #1403
No reviewers
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk!1403
Loading…
Reference in a new issue
No description provided.
Delete branch "find_package_perf"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
see also https://forums.raspberrypi.com/viewtopic.php?t=351995
cc @ndabas
I had posted the question in the Raspberry Pi forum. I tried a new cmake configuration run with the
find_package_perfbranch checked out, and this reduces the time from over 15 minutes to 44 seconds.Thanks, I'll just do a quick test with the Windows installer.
Okay, as it stands right now this is not compiling on Windows with the SDK installer. I'll need to look a bit deeper into it and see how to fix it.
Looks ok. I'll test on Windows and see if I have any issues.
It'll probably work fine if you have native GCC or Visual Studio C++ compilers installed. However the point of making these changes in the first place was that the pico-setup-windows installer does not install native C++ compilers, so the SDK should be able to detect and use the pre-compiled versions of the SDK tools. Which is failing at the moment but I'll look deeper into it.
It works if I structure the first function like this: (and remove the
find_package(pico-sdk-tools ...from global scope):Since the call is now in a conditional, it should not be repeated if we have already found the package somehow (but I have not validated that on Linux.)
Similarly for the
pico_add_uf2_outputfunction:If this solution works, while I don't have permission to push to this PR branch, I can open a new one with the fix.
Ha, that fix is exactly what i was going to suggest (and i had thought about that after i did it!)
Thanks! Looks good, it builds fine with pico-setup-windows now.
thanks