分类: 嵌入式
2010-06-18 21:30:13
在SDRAM或者RAM上创建文件系统的步骤:
1:memDrv(); initializes the memory driver
2:ramDrv(); prepare a RAM disk driver for use
3: pBlkDev = ramDiskDevCreate(ramAddr, bytesPerBlk,
blksPerTrack, nBlocks, blkOffset); //Initialize a RAM Disk device
4: dosFsDevCreate(devName, pBlkDev, maxFiles, DOS_CHK_VERB_SILENT) //create file system device.
5: dosFsVolFormat(devName, DOS_OPT_QUIET, 0) ; //format an MS-DOS compatible volume
6: MDrvSetVolname(MDRV_RAMDISK_DEVNAME0, "preload")//should in forms of ioctl
在Flash上生成文件系统
1: tffsDrv()//initialize the TrueFFS system
2: cbioLibInit()//
3: hashLibInit()//
4: dosFsLibInit()
5 dosFsFatInit
6: dosFsFmtLibInit()//
7: dosFsInit()
8: usrTffsConfig(0,0,MDRV_TFFS0_DEVNAME