Add a sample to read the partition table
Add a sample that reads the partition table from runtime.
I would appreciate comments on the partition table operation procedure itself, as I did not know the correct way to do it and coded it by trial and error.
@oyama You might find some useful partition-related code in https://github.com/raspberrypi/picotool ? :man_shrugging:
@lurch Thank you for the pointer! It looks like the relevant code is around here: https://github.com/raspberrypi/picotool/blob/de8ae5ac334e1126993f72a5c67949712fd1e1a4/bintool/metadata.h#L227 – I'll take a look.
However, my goal is to implement a file system that respects both partitions and permissions, so it seems I'll also need to create a separate read/write example using rom_flash_op().
Based on the comments, the read process of the partition table was divided and organized into a fixed-length field portion and a variable-length field portion.
Thanks suggestions. Very helpful.
@oyama I'd just like to say thank you very much for putting up with all my niggly comments. I sometimes get a bit carried away when reviewing code :laughing:
@lurch Thank you so much for your detailed feedback, it was incredibly helpful and inspiring. I truly appreciate your attention to every little detail, and your comments have motivated me to improve further. Thanks again for your support!
Now that you've added all the code to display extra family IDs, perhaps it's worth exercising that code by putting an extra family ID in your pt.json ? :thinking:
LGTM, but should probably add support for the new cyw43-firmware family (added in raspberrypi/pico-sdk#1969) - this can be done with the following changes
Also pinging @kilograham again about whether any of the defines from this example should be moved into the SDK? (I think specifically
PARTITION_LOCATION_AND_FLAGS_SIZE,PARTITION_ID_SIZE,PARTITION_NAME_MAX, and possibly add#defines for family names)
can you add an sdk issue for me to do that