U 盘和 SD 卡不能同时挂载
Read time: 1 minute(s)
现象
配置好 U 盘挂载功能和 SD 卡挂载功能,单独插入 U 盘或 SD 卡,可正常使用,同时插入后,无法同时使用。
原因分析
SDK 默认配置中,对于文件系统挂载的数量和类型做了限制以节约资源。 通常情况下,进入 menuconfig 配置菜单修改如下两个 DFS 的配置即可同时挂载 U 盘和 SD 卡。
数量及类型
Rt-Thread options ---> RT-Thread Components ---> [*] DFS: device virtual file system ---> (16) The maximal number of mounted file system (8) The maximal number of file system type
卷数量
Rt-Thread options ---> RT-Thread Components ---> [*] DFS: device virtual file system ---> [*] Enable elm-chan fatfs elm-chan's FatFs, Generic FAT Filesystem Module ---> (8) Number of volumes (logical drives) to be used.