Just like title show.
I just want to use FATFS_0.09 run together with rl_usb (not RL_FLASHFS).
any ideas?
or RL_FLASHFS support chinese file names??
Is that means:
/*ps: 1:project use USB. 2:STM32.TXT in 2nd partition. 3:boot.TXT in main partition*/ /* Definitions of physical drive number for each media */ #define ATA 0 #define MMC 1 #define USB 2 #define _MULTI_PARTITION 1 /* 0:Single partition, 1/2:Enable multiple partition */ #if _MULTI_PARTITION == 1 PARTITION VolToPart[] = { {2, 1}, {2, 2}, {1,0} }; #endif /*in main function*/ /*USB == 2*/ res = f_mount(USB,&Fatfs[2]); /*can't mount volume, and return FR_NO_FILESYSTEM*/ if(res != FR_OK) { printf("2:mount fs error :%d \r\n",res); } ... f_mount(USB, NULL); res = f_mount(1,&Fatfs[1]); /*mount volume success*/ if(res != FR_OK) { printf("1:mount fs error :%d \r\n",res); } /*open file fail, return FR_NO_FILESYSTEM*/ res = f_open(&fsrc, "1:/STM32.TXT", FA_OPEN_EXISTING | FA_READ); if(res != FR_OK) { printf("open file error : %d\r\n",res); } else { printf("open file success...\r\n"); f_close(&fsrc); } f_mount(1, NULL); res = f_mount(0,&Fatfs[0]); /*mount volume success*/ if(res != FR_OK) { printf("0:mount fs error :%d \r\n",res); } /*open file success*/ res = f_open(&fsrc, "0:/boot.TXT", FA_OPEN_EXISTING | FA_READ); if(res != FR_OK) { printf("open file error : %d\r\n",res); } else { printf("open file success...\r\n"); f_close(&fsrc); } f_mount(0, NULL);
I read the user manua but did know why?
any ideas to mount partition?
How many logical "_VOLUMES" did you assign?
ffconf.h #define _VOLUMES 1 // <--- 3 /* Number of volumes (logical drives) to be used. */
Tsuneo
I am sorry to tell you that i have defined _VOLUMES
#define _VOLUMES 3 /* Number of volumes (logical drives) to be used. */
hard disk has two logical partition.
i try to use _VOLUMES == 2
and
PARTITION VolToPart[] = { {2, 1}, {2, 2} };
the same error.
1. res = f_mount(USB,&Fatfs[2]); /*can't mount volume, and return FR_NO_FILESYSTEM*/
2. res = f_mount(1,&Fatfs[1]); /*mount volume success but open file fail, return FR_NO_FILESYSTEM*/ ... res = f_open(&fsrc, "1:/STM32.TXT", FA_OPEN_EXISTING | FA_READ);
3. res = f_mount(0,&Fatfs[0]); /*mount volume success and open file success*/ ... res = f_open(&fsrc, "0:/boot.TXT", FA_OPEN_EXISTING | FA_READ);