Skip to content

rp/pio: fix infinite loop when loading program that wont't fit#5704

Open
trnila wants to merge 1 commit intoembassy-rs:mainfrom
trnila:pio_fix_infinite_loop
Open

rp/pio: fix infinite loop when loading program that wont't fit#5704
trnila wants to merge 1 commit intoembassy-rs:mainfrom
trnila:pio_fix_infinite_loop

Conversation

@trnila
Copy link
Copy Markdown
Contributor

@trnila trnila commented Mar 22, 2026

When the returned address wraps around, the search was retried infinitely as the condition origin < 32 is always satisfied.

The loop condition now checks for wrap around. If it occurs, the loop exits since the entire address space has already been searched from zero address.

Fixes #5657

@trnila trnila force-pushed the pio_fix_infinite_loop branch from d982b44 to 895193d Compare March 22, 2026 15:39
When the returned address wraps around, the search was retried infinitely
as the condition `origin < 32` is always satisfied.

The loop condition now checks for wrap around. If it occurs, the loop
exits since the entire address space has already been searched from zero
address.
@xoviat xoviat added the e-rp Issues for the RP family of chips label Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e-rp Issues for the RP family of chips

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PIO try_load_program causes infinite loop instead of InsufficientSpace

2 participants