FileSystem


The Blackfin Handy Board comes with 256 MB of NAND flash.

The primary types of flash presently used in embedded devices are NAND and NOR. The tradeoffs are the following:

  • NOR: More expensive, but is mapped directly into memory, so code can execute directly out of it. This is known as Execute-In-Place, or XIP.
  • NAND: Cheaper, faster, and lower-power, but doesn't support XIP. Also, NAND requires the use of error correction, because bits are expected to fail.

Broadly, NOR is good because you can boot out of it, and it's generally easier to use because you assume it "just works." NAND is a win because it's significantly cheaper, so it's great for media file storage. NAND is typically used in MP3 players and USB thumb drives.

Here are two interesting articles with detailed info on NAND vs. NOR and other contemporary issues in embedded system design and memory architectures:

We can run either JFFS2 (including in Linux since 2.4 kernel) or YAFFS2 YAFFS filesystem.

During week of May 31, Andrew got YAFFS2-direct running on the BF-HB. We can't use YAFFS1 because it is hard-coded with the assumption of 512 byte flash pages, while the BF-HB's NAND flash chip (the ST NAND02GW3B) uses 2048 byte (actually 2112 bytes including spare bytes).

Executable code size for Andrew's YAFFS2-direct demo program is just under 64K. So we believe that this can fit into the 1MB boot SPI along with the rest of a boot loader.

If we choose to go with JFFS2, we will partition the NAND into (say) 32MB areas, because JFFS2 doesn't like large partitions. We believe that JFFS2 will work with the 2KB page sizes of our NAND, and don't expect code size to be significantly larger (it may well be smaller) than the YAFFS2's 64K.