Document the claim API's use in libraries #881
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#881
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?
This is not library friendly:
github.com/raspberrypi/pico-sdk@426e46126b/src/rp2_common/hardware_dma/dma.c (L20)github.com/raspberrypi/pico-sdk@426e46126b/src/rp2_common/hardware_pio/pio.c (L21)I am able to work around this, but this requires a factory. As mentioned here: https://forums.raspberrypi.com/viewtopic.php?t=334125
This is not disclosed in documentation leading to undefined behavior. https://raspberrypi.github.io/pico-sdk-doxygen/group__hardware__dma.html#gae1b3c916746b3d2052f21b7dda34aab9
In fact, is this correct?
This would predict reserved memory which cannot be bypassed. Such reservation would need to be used by the linker script, which is pointless. Perhaps the best solution is to just increase the documentation. Recommending the programmer handle this in their context as appropriate, as the SDK is not the right context to handle this.
My guess is the documentation is written from the perspective of a single static compilation. However, a warning should exist for other cases. Most of these practices are not recommended, however should they be undocumented?
The intention is currently that you always use INTERFACE libraries. if you statically link the SDK code into a static library, then you will end up with unexpected results.
You should be able to workaround this in the meanwhile by just including the
foo_headersrather thanfoolibraries from the SDK, however it is not currently ideal in so far as the_headerslibraries do not have the same dependencies as their non header cohorts. I had been planning to fix this soon, and will add a new issue