[simulator] 解决simulator模拟器不能挂在sd卡的问题,并更新文档
This commit is contained in:
parent
d664edd64e
commit
9b6bc0fcc7
|
@ -29,7 +29,7 @@ CONFIG_IDLE_THREAD_STACK_SIZE=256
|
||||||
# CONFIG_RT_KSERVICE_USING_STDLIB is not set
|
# CONFIG_RT_KSERVICE_USING_STDLIB is not set
|
||||||
# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set
|
# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set
|
||||||
# CONFIG_RT_USING_TINY_FFS is not set
|
# CONFIG_RT_USING_TINY_FFS is not set
|
||||||
# CONFIG_RT_PRINTF_LONGLONG is not set
|
# CONFIG_RT_KPRINTF_USING_LONGLONG is not set
|
||||||
CONFIG_RT_DEBUG=y
|
CONFIG_RT_DEBUG=y
|
||||||
CONFIG_RT_DEBUG_COLOR=y
|
CONFIG_RT_DEBUG_COLOR=y
|
||||||
# CONFIG_RT_DEBUG_INIT_CONFIG is not set
|
# CONFIG_RT_DEBUG_INIT_CONFIG is not set
|
||||||
|
@ -108,9 +108,9 @@ CONFIG_FINSH_ARG_MAX=10
|
||||||
CONFIG_RT_USING_DFS=y
|
CONFIG_RT_USING_DFS=y
|
||||||
CONFIG_DFS_USING_POSIX=y
|
CONFIG_DFS_USING_POSIX=y
|
||||||
CONFIG_DFS_USING_WORKDIR=y
|
CONFIG_DFS_USING_WORKDIR=y
|
||||||
CONFIG_DFS_FILESYSTEMS_MAX=2
|
CONFIG_DFS_FILESYSTEMS_MAX=8
|
||||||
CONFIG_DFS_FILESYSTEM_TYPES_MAX=4
|
CONFIG_DFS_FILESYSTEM_TYPES_MAX=8
|
||||||
CONFIG_DFS_FD_MAX=4
|
CONFIG_DFS_FD_MAX=32
|
||||||
# CONFIG_RT_USING_DFS_MNTTABLE is not set
|
# CONFIG_RT_USING_DFS_MNTTABLE is not set
|
||||||
CONFIG_RT_USING_DFS_ELMFAT=y
|
CONFIG_RT_USING_DFS_ELMFAT=y
|
||||||
|
|
||||||
|
@ -522,6 +522,7 @@ CONFIG_RT_USING_POSIX_FS=y
|
||||||
# CONFIG_PKG_USING_TINYUSB is not set
|
# CONFIG_PKG_USING_TINYUSB is not set
|
||||||
# CONFIG_PKG_USING_CHERRYUSB is not set
|
# CONFIG_PKG_USING_CHERRYUSB is not set
|
||||||
# CONFIG_PKG_USING_KMULTI_RTIMER is not set
|
# CONFIG_PKG_USING_KMULTI_RTIMER is not set
|
||||||
|
# CONFIG_PKG_USING_TFDB is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# peripheral libraries and drivers
|
# peripheral libraries and drivers
|
||||||
|
|
|
@ -52,5 +52,5 @@ int mnt_init(void)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
INIT_COMPONENT_EXPORT(mnt_init);
|
INIT_ENV_EXPORT(mnt_init);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include <dfs.h>
|
#include <dfs.h>
|
||||||
|
|
||||||
#define DBG_TAG "sd.sim"
|
#define DBG_TAG "sd.sim"
|
||||||
#define DBG_LVL DBG_INFO
|
#define DBG_LVL DBG_WARNING
|
||||||
#include <rtdbg.h>
|
#include <rtdbg.h>
|
||||||
|
|
||||||
#define SDCARD_SIM "sd.bin"
|
#define SDCARD_SIM "sd.bin"
|
||||||
|
|
|
@ -53,11 +53,9 @@ RTGUI的最新源码目前托管在github上:https://github.com/RT-Thread/RTGU
|
||||||
sd.bin--模拟SD卡,挂载fat,大小为16M
|
sd.bin--模拟SD卡,挂载fat,大小为16M
|
||||||
nand.bin-模拟nand flash,挂载uffs,参数page=2048+64bytes,block=64pages,16M
|
nand.bin-模拟nand flash,挂载uffs,参数page=2048+64bytes,block=64pages,16M
|
||||||
nor.bin--模拟nor flash,挂载jffs2,型号为sst25vf,2M
|
nor.bin--模拟nor flash,挂载jffs2,型号为sst25vf,2M
|
||||||
第一次启动时,会看到fatfs挂在失败。
|
第一次启动时,会看到fatfs挂在失败,因为文件系统没有格式化,需要键入以下命令:
|
||||||
按下回车,出现finsh,然后输入`mkfs("elm", "sd0")`格式化SD卡,如下所示
|
mkfs sd0
|
||||||
finsh>>mkfs("elm", "sd0")
|
重启运行程序,可以正确挂载、使用FATFS文件系统。
|
||||||
0, 0x00000000
|
|
||||||
重启程序,可以正确挂载fat文件系统。
|
|
||||||
|
|
||||||
2) 测试RTGUI
|
2) 测试RTGUI
|
||||||
打开RTGUI组件后编译,启动在finsh中输入snake_main()并回车,可运行贪吃蛇程序
|
打开RTGUI组件后编译,启动在finsh中输入snake_main()并回车,可运行贪吃蛇程序
|
|
@ -68,9 +68,9 @@
|
||||||
#define RT_USING_DFS
|
#define RT_USING_DFS
|
||||||
#define DFS_USING_POSIX
|
#define DFS_USING_POSIX
|
||||||
#define DFS_USING_WORKDIR
|
#define DFS_USING_WORKDIR
|
||||||
#define DFS_FILESYSTEMS_MAX 2
|
#define DFS_FILESYSTEMS_MAX 8
|
||||||
#define DFS_FILESYSTEM_TYPES_MAX 4
|
#define DFS_FILESYSTEM_TYPES_MAX 8
|
||||||
#define DFS_FD_MAX 4
|
#define DFS_FD_MAX 32
|
||||||
#define RT_USING_DFS_ELMFAT
|
#define RT_USING_DFS_ELMFAT
|
||||||
|
|
||||||
/* elm-chan's FatFs, Generic FAT Filesystem Module */
|
/* elm-chan's FatFs, Generic FAT Filesystem Module */
|
||||||
|
|
Loading…
Reference in New Issue