1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
首先是FAL能正常启动,根目录的分区也挂载正常。 [D/FAL] (fal_flash_init:61) Flash device | coreboard | addr: 0x00000000 | len: 0x01000000 | blk_size: 0x00001000 |initialized finish. [D/FAL] (fal_flash_init:61) Flash device | norflash0 | addr: 0x00000000 | len: 0x01000000 | blk_size: 0x00001000 |initialized finish. [I/FAL] ==================== FAL partition table ==================== [I/FAL] | name | flash_dev | offset | length | [I/FAL] ------------------------------------------------------------- [I/FAL] | bootloader | coreboard | 0x00000000 | 0x00008000 | [I/FAL] | app | coreboard | 0x00008000 | 0x007f8000 | [I/FAL] | littlefs | coreboard | 0x00800000 | 0x00200000 | [I/FAL] | download | coreboard | 0x00a00000 | 0x00200000 | [I/FAL] | fatfs | coreboard | 0x00c00000 | 0x00300000 | [I/FAL] | easyflash | coreboard | 0x00f00000 | 0x00100000 | [I/FAL] | file | norflash0 | 0x00000000 | 0x01000000 | [I/FAL] ============================================================= [I/FAL] RT-Thread Flash Abstraction Layer (V0.5.0) initialize success. [I/FAL] The FAL MTD NOR device (littlefs) created successfully [I/littlefs.sample] para initialized! [I/FAL] The FAL MTD NOR device (download) created successfully [E/littlefs.sample] Failed to initialize download! [Flash] (packagesEasyFlash-v4.1.0srcef_env.c:1818) ENV start address is 0x00000000, size is 8192 bytes. [Flash] EasyFlash V4.1.0 is initialize success. [Flash] You can get the latest version on 挂载第一个分区后,新建目录,用于挂载download分区,但是挂载失败 int result = 0; #ifdef PKG_USING_FAL // 初始化 fal fal_init(); #else return; #endif #ifdef PKG_USING_LITTLEFS #define LITTLEFS_PARTITION_NAME "littlefs" struct rt_device *mtd_dev = RT_NULL; // 创建 mtd 设备 mtd_dev = fal_mtd_nor_device_create(LITTLEFS_PARTITION_NAME); if (!mtd_dev) { LOG_E("Can't create a mtd device on '%s' partition.", LITTLEFS_PARTITION_NAME); } else { // 挂载littlefs // 参数: 块设备名、文件系统挂载点路径,挂载文件系统类型,读写标志位,文件系统的私有数据 if (dfs_mount(LITTLEFS_PARTITION_NAME, "/", "lfs", 0, 0) == 0) { LOG_I("para initialized!"); } else { /* 格式化文件系统 */ dfs_mkfs("lfs", LITTLEFS_PARTITION_NAME); /* 挂载 littlefs */ if (dfs_mount(LITTLEFS_PARTITION_NAME, "/", "lfs", 0, 0) == 0) { LOG_I("%s initialized!",LITTLEFS_PARTITION_NAME); } else { LOG_E("Failed to initialize %s!",LITTLEFS_PARTITION_NAME); result = -1; } } } if(result == 0) { #define LITTLEFS_PARTITION_NAME2 "download" mtd_dev = fal_mtd_nor_device_create(LITTLEFS_PARTITION_NAME2); if (!mtd_dev) { LOG_E("Can't create a mtd device on '%s' partition.", LITTLEFS_PARTITION_NAME2); } else { if(opendir("/c") == RT_NULL) { mkdir("c",0); } if (dfs_mount(LITTLEFS_PARTITION_NAME2, "/c", "lfs", 0, 0) == 0) { LOG_I("%s Filesystem initialized!",LITTLEFS_PARTITION_NAME2); } else { dfs_mkfs("lfs", LITTLEFS_PARTITION_NAME2); if (dfs_mount(LITTLEFS_PARTITION_NAME2, "/c", "lfs", 0, 0) == 0) LOG_I("%s Filesystem initialized!",LITTLEFS_PARTITION_NAME2); else LOG_E("Failed to initialize %s!",LITTLEFS_PARTITION_NAME2); } } } #endif #ifdef PKG_USING_EASYFLASH /* easyflash init */ easyflash_init(); #endif mtd设备是正常创建的, device type ref count -------- -------------------- ---------- download MTD Device 0 littlefs MTD Device 1 norflash Block Device 0 adc1 Miscellaneous Device 0 pwm2 Miscellaneous Device 0 pwm1 Miscellaneous Device 0 刚开始使用文件系统,求大佬指导下,问题在哪。。 |
|
相关推荐
3个回答
|
|
|
|
|
|
先挂载download的话就可以,就是第二个挂不上去
|
|
|
|
原因找到了,是因为挂两个 lfs, RT_DEF_LFS_DRIVERS 的值为 1,导致挂两个 lfs 挂不上去。改成2就好了
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
683 浏览 0 评论
AI模型部署边缘设备的奇妙之旅:如何在边缘端部署OpenCV
2521 浏览 0 评论
tms320280021 adc采样波形,为什么adc采样频率上来波形就不好了?
1314 浏览 0 评论
1915 浏览 0 评论
1494 浏览 0 评论
74890 浏览 21 评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-24 03:05 , Processed in 0.640008 second(s), Total 45, Slave 39 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号