Replies: 2 comments
-
Zephyr already contains DTS bindings for generic AT24 (https://github.com/zephyrproject-rtos/zephyr/blob/main/dts/bindings/mtd/atmel%2Cat24.yaml) and generic AT25 (https://github.com/zephyrproject-rtos/zephyr/blob/main/dts/bindings/mtd/atmel%2Cat25.yaml) EEPROMS - along with a common driver for the two (https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/eeprom/eeprom_at2x.c). You can access the EEPROM devices using the Zephyr EEPROM API (https://docs.zephyrproject.org/latest/hardware/peripherals/eeprom.html). LittleFS has to my knowledge not been ported to use the Zephyr EEPROM API as backend. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply. Since flash is an offspring of EEPROM, what would you see as the level of effort to achieve a littlefs port? Do you see this as a small, medium, or large task? What general directions could you provide. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We are developing a custom board, and need persistent settings stored and retrieved from non-volatile media using the littlefs for file i/o and an EEPROM for the physical media.
While we have some primitives in our driver to read and write to EEPROM, initialize and register - I am unable to build a test application using the following requisite Zephyr kernel configurations which brings in the Littlefs, flash, and flash mapping.
It could certainly be that our driver is not complete relative to Zephyr integration, and that is what I am hoping to gain some insight into.
Also note that there seems to be a distinction in Zephyr between "flash" and "eeprom" that I do not fully understand all the nuances. For example, do I need to define an alias for "flash" in the device tree to get the littlefs to sit atop this NV storage medium?
The chosen section of the DTS is as follows (does not include a flash or flash_controller directive).
Our device tree for the EEPROM in terms of aliases is as follows:
Where eeprom is as accessed via an I2C interface as follows:
Our driver is based on the Atmel mc24aa I2C and Atmel AT25 SPI EEPROMs as source file eeprom_mc24aa.c, which includes the following device tree definition/registration:
Beta Was this translation helpful? Give feedback.
All reactions