Skip to content

Conversation

@TerryGeng
Copy link

In #11, a portion of code was stripped from flash_rpi_pico.c from Zephyr's code base and was inserted here and was revised to be compatible with RP2350. Notably, the type of the argument was changed from enum into bool, resulting in compatiblity issue with existing RP2040 code that calls this function with an enum.

Fixes zephyrproject-rtos/zephyr#95729
Fixes zephyrproject-rtos/zephyr#96224

In zephyrproject-rtos#11, a portion of code was stripped from `flash_rpi_pico.c` from Zephyr's code base
and was inserted here and was revised to be compatible with RP2350. Notably, the type of
the argument was changed from enum into bool, resulting in compatiblity issue with
existing RP2040 code that calls this function with an enum.

Fixes zephyrproject-rtos/zephyr#95729
Fixes zephyrproject-rtos/zephyr#96224
@TerryGeng
Copy link
Author

@soburi @ajf58 @ThreeEights @yonsch @kartben

Would you please have a look if you have a chance?

@ajf58 ajf58 requested review from ajf58 and soburi November 24, 2025 21:20
@ajf58
Copy link
Collaborator

ajf58 commented Nov 24, 2025

Thanks for raising this. It looks like @hanan619 can't be @ mentioned. I've started to look at this, but need to spend a bit of time revisiting the original pair of PRs.

@TerryGeng
Copy link
Author

This might be an irrelevant point: As I'm taking a closer look at #11, it states that the added code is mostly from the bootrom, and I think it can be directly called from the bootrom if the correct offset is known. Some functions don't exist in the bootrom lookup table (those added by #11) but can be looked up from the bootrom ELF file.

For RP2040 bootrom B2:

> objdump -t b2.elf | less

00000bb8 l     F .text  00000024 flash_put_cmd_addr
...
00001824 l     F .text  0000003c flash_wait_ready
...
00001770 l     F .text  00000068 flash_put_get
...
00001804 l     F .text  0000001e flash_enable_write

So maybe there isn't a need to copy that code at all? 👀

@TerryGeng
Copy link
Author

@ajf58 @soburi Nudge... Did you get a chance to look into this?

@soburi soburi self-assigned this Dec 12, 2025
Copy link
Member

@soburi soburi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for your fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants