Open
Description
I designed a development board with two 16M flash chips and correctly configured the opt parameters, but picotool can only recognize 16M of space.I found an issue in the source code of guess_flash_size
// Read at decreasing power-of-two addresses until we don't see the boot pages again
const int min_size = 16 * PAGE_SIZE;
const int max_size = 8 * 1024 * 1024;
int size;
for (size = max_size; size >= min_size; size >>= 1) {
auto new_pages = access.read_vector<uint8_t>(FLASH_START + size, 2 * PAGE_SIZE);
if (!std::equal(first_two_pages.begin(), first_two_pages.end(), new_pages.begin())) break;
}
return size * 2;
Then I change the max_size
to 16x1024x1024,All the picotool functions,such as info /load/save .. can run correctly.
Considering future scalability, there should be a better configuration option to address this issue.
Metadata
Metadata
Assignees
Labels
No labels