Change size of FFS drive (MQX 4.0.1, TWR-K70)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Change size of FFS drive (MQX 4.0.1, TWR-K70)

跳至解决方案
4,129 次查看
friederschrempf
Contributor IV

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!

1 解答
2,488 次查看
DavidS
NXP Employee
NXP Employee

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.

ScreenHunter_23 Jun. 27 13.26.gif

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.

ScreenHunter_24 Jun. 27 13.35.gif

Regards,

David

在原帖中查看解决方案

0 项奖励
回复
23 回复数
2,489 次查看
DavidS
NXP Employee
NXP Employee

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.

ScreenHunter_23 Jun. 27 13.26.gif

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.

ScreenHunter_24 Jun. 27 13.35.gif

Regards,

David

0 项奖励
回复
255 次查看
okaner
Contributor III

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

0 项奖励
回复
255 次查看
friederschrempf
Contributor IV

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.

0 项奖励
回复