Creating a file system on the onboard flash for my ebook reader so that configs, fonts, and somebody's favorite books could be stored there instead of on the sd card.
At first I was using the embassy_rp::flash API but the flash has an unusual 4KiB writes, 4-256 byte reads and things where just getting a little complicated.
Then I realized I could use the linker to map the flash and let my FAT32/16/12 library work on the array. And the flash interactions are handled the same way that code is. Cut my code size for dealing with the flash from several hundred to a couple dozen(not counting the filesystem stuff). I am currently erasing it every time I update the firmware but that's a problem for future me.
Next I need to make the device show up as a usb hub with 1 or 2 mass storage devices. 1 for the on board flash and 1 for the sd card.
#embedded #no_std #rust