I'm using the FFS library with the example project (NAND Flash File System patch for Freescale MQX™ RTOS 4.0.0). After running the format command from the shell I always get 10 723 328 bytes free disk space.
I want to enlarge the drive to cover e.g. 100M of NANDFLASH. I tried modifiying NANDFLASH_1ST_DATA_DRIVE_SIZE_IN_BLOCK but without effect.
Has anyone got a hint for me, please? Thank you!
Solved! Go to Solution.
Hi Frieder,
I opened the nandflash_wl.ffs.h header in the ffs_twrk70f120m project and changed the define as follows:
#define NANDFLASH_1ST_DATA_DRIVE_SIZE_IN_BLOCK 200 //DES was 90
Recompile the ffs, then recompile the mfs_nandflash_twrk70f120m example project and it did increase the disk space.
Note that the default 90 size gave a 10.7MB disk and a 200 size gave a 251MB size.
So the example we have is generating (or partitioning) a small disk on the NAND flash and not making it one big disk.
The specific NAND device information is in the bsp_twrk70f120m MT29F2G16.c file.
When I changed the block to 1937 (2048-110-1) I got a big disk.
Regards,
David
Hi Frieder,
I opened the nandflash_wl.ffs.h header in the ffs_twrk70f120m project and changed the define as follows:
#define NANDFLASH_1ST_DATA_DRIVE_SIZE_IN_BLOCK 200 //DES was 90
Recompile the ffs, then recompile the mfs_nandflash_twrk70f120m example project and it did increase the disk space.
Note that the default 90 size gave a 10.7MB disk and a 200 size gave a 251MB size.
So the example we have is generating (or partitioning) a small disk on the NAND flash and not making it one big disk.
The specific NAND device information is in the bsp_twrk70f120m MT29F2G16.c file.
When I changed the block to 1937 (2048-110-1) I got a big disk.
Regards,
David
Hi David,
I installed mqx 4.0.2 and new ffs. I have done same steps but now I get smaller disk size. Do you have any idea. Thank you. TWRK60f120m. I was successful on mqx 4.0.1.
nandflash_wl_ffs.h
#define NANDFLASH_1ST_DATA_DRIVE_SIZE_IN_BLOCK 1937
#define NANDFLASH_1ST_DATA_DRIVE_START_BLOCK 110
Formating...
Done. Volume name is
Free disk space: 126212096 bytes
Okan ERCAN
Thank you for your detailed instructions!
I have tried this before. Now I had a closer look at the recompiled library and found out, that the nandflash_wl_ffs.h file in the library directory was somehow not replaced by the new one. I deleted it manually. Rebuild again and then it worked.