Hi Tim,

What is the P/N# of your SPI EEPROM?

As Sébastien said the best option is adding support to your SPI EEPROM as
MTD.

I used char dev EEPROM in the past with a circular packet buffer. It was
used to store tracking data before sending it to the cloud. It was faster
than using MTD in the device.

Maybe for SPI EEPROM using MTD is not so slow like for I2C EEPROM, case you
can access it at 10MHz or more.

Best Regards,

Alan

On Thursday, December 14, 2023, Tim Hardisty <timhardist...@gmail.com>
wrote:

> Question first, then explanation.
>
> How do I use losetup (which is what I think I need) with a character
> memory device and mount an FS on it? SPI EEPROM and LittleFS specifically.
>
> Yes, it's a bad idea, probably, but I just want to have a play and lack of
> NuttX/POSIX/Linux knowledge has bitten my behind again. This is perhaps the
> 3rd time over the years I've asked but even checking the dev emails archive
> and I can't find what I need.
>
> SPI EEPROM is correctly registered as /dev/at25 and I can read/write/etc
> to it as a character device. NB: it does not initialize in the same way as
> an I2C EEPROM so you can't directly initialise it as an mtd. It is for
> storage of settings, and some of the values may change 10,000's time over
> the life of the product, hence EEPROM with 1,000,000+ write cycles.
>
> But there is then no wear levelling or anything like that as just a
> character device, so I thought I'd have a play, and LittleFS has a small
> minimum sector size and *might* work. A quick Google turns up the same
> Linux-related losetup examples that don't seem relevant; my Googling skills
> are probably as bad as those of my software engineering <grin><rolleyes>.
>
> Any pointers/suggestions please?
>

Reply via email to