pico_btstack/CMakeLists.txt makes PICO_BTSTACK_PATH unusable #1553
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#1553
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
The
pico_btstacklibraryCMakeLists.txthard-codes all of thebtstacksource files. This means that it's tightly coupled to a specificbtstackversion.This is causing problems for my project,
picow_ds4(see https://github.com/usedbytes/picow_ds4/issues/1) which submodulesbtstackin order to support Playstation 4 controllers (which have HID descriptors which are too big for the upstream default) - and usesPICO_BTSTACK_PATHto use that submoduled version.pico-sdkhas updated itsbtstack, I have not, so now my project doesn't build with an updatedpico-sdk.Having all of the source files listed in a
CMakeLists.txtwhich lives insidepico-sdkseems like a layering violation - it's effectively an unmanaged dependency to a specific version ofbtstack, which is somewhat fragile.You're welcome to argue that the submodule provides the versioning :-) - if you have the same version of
btstackas what's submoduled in topico-sdkthen there's no issue. However it does make it basically impossible for projects to usePICO_BTSTACK_PATHunless they also submodulepico-sdk, which I'd like to avoid if possible.I wonder if it would be better to have the
pico_btstackbuild done withinbtstackitself, as a port, rather than managed by thepico-sdkbuild directly?Related to #1379 / #1380 which is the specific PR which caused the particular breakage in https://github.com/usedbytes/picow_ds4/issues/1
Yes. If there was a cmake file in btstack we would use it.
@mringwal Do you have an opinion on this? It would be nice to not hardcode the list of source files in the pico-sdk but just include it from btstack. I think I copied the list from Micropython, so they have the same issue. I imagine I could convert your Makefile.inc files to cmake files with some "magic" but I doubt that would be that robust.
@peterharperuk this is mainly relevant while people try stuff that hasn't been used much in the past ;)
In general, I agree with the observations. I guess there are two main options here: a) is to provide a minimal CMakeLists.txt that contain all files from btstack/src that are currently used for inclusion (that would synchronize the list with the actual files). The fancier version is to fully embrace CMake. We started to consolidate our various CMake builds and have an early proof-of-concept (see global-cmake branch). I'm not sure yet, what path we'll use.
Yeah, note some libraries just provide a CMake file which defines a variable with all the filenames