pico_flash: Support FreeRTOS Static Allocation #2229
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!2229
Loading…
Reference in a new issue
No description provided.
Delete branch "develop"
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?
Fixes #2120
Allows
pico_flashto use FreeRTOS static allocation as currently static-only builds fail without this change.@ -145,7 +145,16 @@ static int default_enter_safe_zone_timeout_ms(__unused uint32_t timeout_ms) {uint core_num = get_core_num();should be
if !configSUPPORT_DYNAMIC_ALLOCATION@ -145,7 +145,16 @@ static int default_enter_safe_zone_timeout_ms(__unused uint32_t timeout_ms) {uint core_num = get_core_num();it was also backwards
Seems like this might be a nicer alternative
@ -145,7 +145,16 @@ static int default_enter_safe_zone_timeout_ms(__unused uint32_t timeout_ms) {uint core_num = get_core_num();How did I miss that? good catch!
One thing I want to get your thoughts on (and sorry for the couple days of delay here): would it be better to default to static allocation and only switch to dynamic if static allocation isn't enabled?
For some reason I skipped that — I can switch to it and let you know if it compiles. Unfortunately I don't really have any way to make sure that things still work besides compiling.
compiling is better than me as I don't have a config with this setup, so would have to make one
OK, so this isn't ideal as it will likely crash if
flash_safe_execute()is called from both cores concurrently in this case.. I am approving anyway, becausea) This does compile and likely works correctly when not doing that
b) That use case is probably unlikely
c) Arguably the existing implementation is not very robust in that regard, so I will open a separate issue