Forum Discussion
Altera_Forum
Honored Contributor
14 years agoIn the wiki you will find how to use MTD to define a Flash area as a block device a file system can be mounted on. Of course this area can be restricted to a part of the hardware-address space of the flash.
But mind, that the hardware of flash chips is organized in blocks of bytes, that only can be erased (and thus modified) completely. The size and count of the blocks depends on the type of the chip used. Also mind that there is a "wear-out" effect: each block of a Flash chip can only be erased a maximum count of times. A dedicated Flash File System takes care of this by adding updated data in free places and using the blocks it manages in a cyclic way. To do this decently it needs to be allowed to use an appropriately large count of blocks. There are "Program" Flash chips with large blocks and small maximum erase count and there are "data" Flash chips with small blocks and high maximum erase count (there are multiple more types, as well). If you want to use the same flash chip(s) for your Image and for storing changeable data, beware that you use enough blocks to avoid destroying the chip by erasing a block too often. Using Flash memory is not trivial at all. So if possible you should not try to do propriety software to manage it. -Michael