Skip to content

Conversation

@peterharperuk
Copy link
Contributor

We assume that PICO_NO_FLASH binaries means the device does not have a flash chip. But it's possible that you want a ram binary AND want to mess about with flash, e.g. for flash nuke or something that uses the unique flash id.

Add PICO_INCLUDE_FLASH_UTILS which forces some flash functions to be included.

@peterharperuk
Copy link
Contributor Author

Needed for this raspberrypi/pico-examples#653

@will-v-pi
Copy link
Contributor

Probably would be nicer if PICO_INCLUDE_FLASH_UTILS defaulted to !PICO_NO_FLASH, rather than needing to check both in all the #ifs?

#ifndef PICO_INCLUDE_FLASH_UTILS 
#define PICO_INCLUDE_FLASH_UTILS  !PICO_NO_FLASH
#endif

It would also need a PICO_CONFIG comment, so it appears in the docs

@peterharperuk
Copy link
Contributor Author

defaulted to !PICO_NO_FLASH

Then you would be able to remove these functions by setting PICO_INCLUDE_FLASH_UTILS=0 in flash builds. Which will cause odd behaviour?

@peterharperuk peterharperuk force-pushed the flash_functions_with_pico_no_flash branch from e320477 to e3779f5 Compare December 12, 2025 13:59
We assume that PICO_NO_FLASH binaries means the device does not have
a flash chip. But it's possible that you want a ram binary AND want
to mess about with flash, e.g. for flash nuke or something that uses
the unique flash id.

Add PICO_INCLUDE_FLASH_UTILS which forces some flash functions to be
included.
@peterharperuk peterharperuk force-pushed the flash_functions_with_pico_no_flash branch from e3779f5 to 59aa1e7 Compare December 12, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants