AnsweredAssumed Answered

FTP and flash file system for RT1020?

Question asked by rshipman on Feb 13, 2020
Latest reply on Feb 21, 2020 by samsaprunoff



What is the best way to get a file system set up in flash?

For example, the RT1020-EVK has an 8MByte flash, and I would like to set up a flash FS that allows FTP access (via ethernet)?


I am looking at FatFS, including the evkmimxrt1020_sdcard_fatfs SDK demo as a starting point.


There does not seem to be an obvious physical drive number for flash (to give to f_mount):


/* Definitions of physical drive number for each drive */
#define RAMDISK 0 /* Example: ram disk to physical drive 0 */
#define USBDISK 1 /* usb disk to physical drive 1 */
#define SDDISK 2 /* sd disk to physical drive 2 */
#define MMCDISK 3 /* mmc disk to physical drive 3 */
#define SDSPIDISK 4 /* sdspi disk to physical drive 4 */
#define NANDDISK 5 /* nand disk to physical drive 5 */


What if I modified the RAMDISK support to handle erasing, and configured fatfs to allow for the flash page size?

Is this a sensible approach, or is there a much better way? Perhaps using a different file system/library?


Any information/suggestion greatly appreciated.