b. Should I put the raw_nand method drivers/mtd/ or the board specific folder?I
think I should put in the mtd folder for micron specific
That depends on if the code is modular and reusable by other
architectures or it depends on the unique properties of the board. The
better design would be to pat the driver in drivers/mtd and perhaps
provide a "bottom half" driver interfaces in include/nuttx/mtd to handle
board differences.
c. license of YAFFS2 is GPL which would pollute the nuttx BSD license, what is
your advice? I have to link it with library format ?
No GPL code may come into NuttX. That will never be possible You are
free to use YAFFS2 on your own, but it cannot come into NuttX.
e. As I understand, the raw nand filesystem is always a big headache for many
rtos, if you don't choose linux you only have very
limited options for free use, FAT is a obvious option but you have to working
on the FTL level by yourself. It is meaningful to
choose raw nand for low cost electronic product other than sd-card competitable
storgage.
And alternative FTL layer would be a good solution. The current one is
very simple, it only creates a block driver.
You could create a NAND-specific FTL if you wanted. The only issue with
using NAND is that all FLASH file systems expect to able to change 1's
to 0's at any time. You can't do that with NAND because it breaks the
ECC. A more complex (and slower) FTL layer coude do this, however, by
doing a SAVE - ERASE - MODIFY - RECALCULATE ECC - WRITE operation.
Greg