Skip to content

Commit 5f0ea12

Browse files
tyethclaude
andcommitted
zephyr-cp: raise the rpi_pico UDC thread stack in debug builds
debug.conf bumps the DWC2 and nRF UDC thread stacks because verbose logging with LOG_MODE_IMMEDIATE formats in-thread and needs more stack, but the rpi_pico one was missed. It defaults to 512 bytes, which overflows during USB enumeration on a Pico 2 W: ***** USAGE FAULT ***** Stack overflow (context area not valid) >>> ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0 Current thread: 0x200034b0 (usbd@50110000) The board dies partway through configuration, which looks like a bad USB come-up rather than a stack problem. Independent of any Bluetooth work — it affects any RP2040/RP2350 board built with DEBUG=1. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 121489f commit 5f0ea12

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

ports/zephyr-cp/debug.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
3535
CONFIG_MAIN_STACK_SIZE=32768
3636
CONFIG_ISR_STACK_SIZE=4096
3737
CONFIG_UDC_DWC2_STACK_SIZE=4096
38+
CONFIG_UDC_RPI_PICO_STACK_SIZE=2048
3839
CONFIG_UDC_NRF_THREAD_STACK_SIZE=4096
3940
CONFIG_USBD_THREAD_STACK_SIZE=4096
4041
CONFIG_USBD_MSC_STACK_SIZE=4096

0 commit comments

Comments
 (0)