I'm trying to understand what level of NAND memory support currently exists in 
NuttX. The intention is to read and write files on the NAND memory.
Device level support is in place, but probably somewhat out of date.  The obstacle to use NAND is that there is no NAND-compatibile file system or FTL layer.
I have found CONFIG_MTD_NAND and there seems to be a NAND driver for the SAMA5 
built-in NAND. All other MTD drivers appear to be for NOR? The intention is to 
use a Winbond W25N NAND memory, but I'm assuming the SAMA5 driver will be 
closer to what I need than the W25QxxxJV NOR driver (NAND vs NOR)?

Regarding a file system, the NuttX About page mentions "NXFFS. The tiny NuttX 
wear-leveling FLASH file system." and there is also the option to enable littlefs.

https://github.com/ARMmbed/littlefs/issues/11 indicates that one wants an FTL 
below littlefs. Going by the existence of CONFIG_FTL_READAHEAD and 
CONFIG_WRITEBUFFER, it seems that the FTL is integrated in MTD in NuttX?

NXFFS will not work on NAND.  It assume NOR memory because it assumes that it can re-write any '1' bit to '0'.  If you try that on NAND, it breaks the ECC.

There is an FTL, but it will not work with either NAND or LittleFS.  FTL is a "Flash Translation Layer" and there can be many different types of FTLs. The FTL in the repository only works with NOR FLASH; it only converts the MTD driver interface into a standard block driver interface that can be used with any file system such as FAT.

An FTL for NAND would also have to handle ECCs, bad block management, sparing, etc.  Nothing like that exists.

The raw NAND MTD driver does most of that, however (mtd_nand.c). I don't know if that is sufficient to work with LittleFS or not. LittleFS is not intrinsically a part of NuttX and I have never used it and, of course, I have never tried it with NAND.

Is SMART File System (CONFIG_FS_SMARTFS) related to the  "Really Tiny (SMART) 
Flash" (CONFIG_MTD_SMART) option? The latter says that it is only usable for really 
small memories.
No, it is an original FS written by Ken Pettit that also only runs on NOR FLASH because it also expects to be able to change erased bits to the non-erased state without re-writing the block.  I believe that Ken once said that he had a design modification in mind that would permit operation on NAND.

Reply via email to