Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
rt-smart
DFS问题
lwext4
rt-smart中dfs_v2和lwext4冲突问题
发布于 2024-10-09 18:26:52 浏览:228
订阅该版
[tocm] # dfs_v2和lwext4冲突问题 大家好,我在RTThread_v5.2.0版本 bsp/qemu-virt64-aarch64下参考smart教程,编译时打开了 RT_USING_SMART和PKG_USING_LWEXT4,并执行了 `pkgs --update` ,scons编译时遇到问题如下 ``` CC build/packages/lwext4-latest/ports/rtthread/dfs_ext.o CC build/packages/lwext4-latest/ports/rtthread/dfs_ext_blockdev.o packages/lwext4-latest/ports/rtthread/dfs_ext.c: In function 'get_fd_file': packages/lwext4-latest/ports/rtthread/dfs_ext.c:74:23: error: 'struct dfs_vnode' has no member named 'fullpath' 74 | fn = fd->vnode->fullpath; | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c: At top level: packages/lwext4-latest/ports/rtthread/dfs_ext.c:83:33: warning: 'struct dfs_filesystem' declared inside parameter list will not be visible outside of this definition or declaration 83 | static int dfs_ext_mount(struct dfs_filesystem *fs, unsigned long rwflag, const void *data) | ^~~~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c: In function 'dfs_ext_mount': packages/lwext4-latest/ports/rtthread/dfs_ext.c:90:38: error: invalid use of undefined type 'struct dfs_filesystem' 90 | dbd = dfs_ext4_blockdev_create(fs->dev_id); | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:94:27: error: invalid use of undefined type 'struct dfs_filesystem' 94 | rc = ext4_mount(bd, fs->path, false); | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:102:34: error: invalid use of undefined type 'struct dfs_filesystem' 102 | ext4_mount_setup_locks(fs->path, &ext4_lock_ops); | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:104:11: error: invalid use of undefined type 'struct dfs_filesystem' 104 | fs->data = (void*)dbd; | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c: At top level: packages/lwext4-latest/ports/rtthread/dfs_ext.c:110:35: warning: 'struct dfs_filesystem' declared inside parameter list will not be visible outside of this definition or declaration 110 | static int dfs_ext_unmount(struct dfs_filesystem *fs) | ^~~~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c: In function 'dfs_ext_unmount': packages/lwext4-latest/ports/rtthread/dfs_ext.c:115:41: error: invalid use of undefined type 'struct dfs_filesystem' 115 | dbd = (struct dfs_ext4_blockdev *)fs->data; | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:118:22: error: invalid use of undefined type 'struct dfs_filesystem' 118 | char *mp = fs->path; /*mount point */ | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c: At top level: packages/lwext4-latest/ports/rtthread/dfs_ext.c:174:34: warning: 'struct dfs_filesystem' declared inside parameter list will not be visible outside of this definition or declaration 174 | static int dfs_ext_statfs(struct dfs_filesystem *fs, struct statfs *buf) | ^~~~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c: In function 'dfs_ext_statfs': packages/lwext4-latest/ports/rtthread/dfs_ext.c:179:31: error: invalid use of undefined type 'struct dfs_filesystem' 179 | error = ext4_get_sblock(fs->path, &sb); | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c: In function 'dfs_ext_read': packages/lwext4-latest/ports/rtthread/dfs_ext.c:239:9: error: 'struct dfs_file' has no member named 'pos'; did you mean 'fpos'? 239 | fd->pos = file->fpos; | ^~~ | fpos packages/lwext4-latest/ports/rtthread/dfs_ext.c: In function 'dfs_ext_write': packages/lwext4-latest/ports/rtthread/dfs_ext.c:259:9: error: 'struct dfs_file' has no member named 'pos'; did you mean 'fpos'? 259 | fd->pos = file->fpos; | ^~~ | fpos packages/lwext4-latest/ports/rtthread/dfs_ext.c: In function 'dfs_ext_open': packages/lwext4-latest/ports/rtthread/dfs_ext.c:347:23: error: 'struct dfs_file' has no member named 'pos'; did you mean 'fpos'? 347 | file->pos = f->fpos; | ^~~ | fpos packages/lwext4-latest/ports/rtthread/dfs_ext.c: At top level: packages/lwext4-latest/ports/rtthread/dfs_ext.c:360:34: warning: 'struct dfs_filesystem' declared inside parameter list will not be visible outside of this definition or declaration 360 | static int dfs_ext_unlink(struct dfs_filesystem *fs, const char *pathname) | ^~~~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c: In function 'dfs_ext_unlink': packages/lwext4-latest/ports/rtthread/dfs_ext.c:371:11: error: invalid use of undefined type 'struct dfs_filesystem' 371 | if (fs->ops->flags & DFS_FS_FLAG_FULLPATH) | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:377:22: error: invalid use of undefined type 'struct dfs_filesystem' 377 | if (strlen(fs->path) != 1) | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:379:41: error: invalid use of undefined type 'struct dfs_filesystem' 379 | stat_path = malloc(strlen(fs->path) + strlen(pathname) + 1); | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:380:50: error: invalid use of undefined type 'struct dfs_filesystem' 380 | snprintf((char *)stat_path, strlen(fs->path) + strlen(pathname) + 1, "%s%s", fs->path, pathname); | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:380:92: error: invalid use of undefined type 'struct dfs_filesystem' 380 | snprintf((char *)stat_path, strlen(fs->path) + strlen(pathname) + 1, "%s%s", fs->path, pathname); | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c: At top level: packages/lwext4-latest/ports/rtthread/dfs_ext.c:403:32: warning: 'struct dfs_filesystem' declared inside parameter list will not be visible outside of this definition or declaration 403 | static int dfs_ext_stat(struct dfs_filesystem *fs, const char *path, struct stat *st) | ^~~~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c: In function 'dfs_ext_stat': packages/lwext4-latest/ports/rtthread/dfs_ext.c:423:11: error: invalid use of undefined type 'struct dfs_filesystem' 423 | if (fs->ops->flags & DFS_FS_FLAG_FULLPATH) | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:429:22: error: invalid use of undefined type 'struct dfs_filesystem' 429 | if (strlen(fs->path) != 1) | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:431:41: error: invalid use of undefined type 'struct dfs_filesystem' 431 | stat_path = malloc(strlen(fs->path) + strlen(path) + 1); | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:432:50: error: invalid use of undefined type 'struct dfs_filesystem' 432 | snprintf((char *)stat_path, strlen(fs->path) + strlen(path) + 1, "%s%s", fs->path, path); | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:432:88: error: invalid use of undefined type 'struct dfs_filesystem' 432 | snprintf((char *)stat_path, strlen(fs->path) + strlen(path) + 1, "%s%s", fs->path, path); | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:454:32: error: invalid use of undefined type 'struct dfs_filesystem' 454 | st->st_dev = (dev_t)(fs->dev_id); | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:478:36: error: invalid use of undefined type 'struct dfs_filesystem' 478 | st->st_dev = (dev_t)(fs->dev_id); | ^~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:415:14: warning: variable 'dev' set but not used [-Wunused-but-set-variable] 415 | uint32_t dev = 0; | ^~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c: In function 'dfs_ext_getdents': packages/lwext4-latest/ports/rtthread/dfs_ext.c:550:11: error: 'struct dfs_file' has no member named 'pos'; did you mean 'fpos'? 550 | file->pos += index * sizeof(struct dirent); | ^~~ | fpos packages/lwext4-latest/ports/rtthread/dfs_ext.c: At top level: packages/lwext4-latest/ports/rtthread/dfs_ext.c:555:34: warning: 'struct dfs_filesystem' declared inside parameter list will not be visible outside of this definition or declaration 555 | static int dfs_ext_rename(struct dfs_filesystem *fs, const char *oldpath, const char *newpath) | ^~~~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:569:5: warning: initialization of 'ssize_t (*)(struct dfs_file *, void *, size_t, off_t *)' {aka 'long int (*)(struct dfs_file *, void *, long unsigned int, long int *)'} from incompatible pointer type 'int (*)(struct dfs_file *, void *, size_t)' {aka 'int (*)(struct dfs_file *, void *, long unsigned int)'} [-Wincompatible-pointer-types] 569 | dfs_ext_read, | ^~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:569:5: note: (near initialization for '_ext_fops.read') packages/lwext4-latest/ports/rtthread/dfs_ext.c:570:5: warning: initialization of 'ssize_t (*)(struct dfs_file *, const void *, size_t, off_t *)' {aka 'long int (*)(struct dfs_file *, const void *, long unsigned int, long int *)'} from incompatible pointer type 'int (*)(struct dfs_file *, const void *, size_t)' {aka 'int (*)(struct dfs_file *, const void *, long unsigned int)'} [-Wincompatible-pointer-types] 570 | dfs_ext_write, | ^~~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:570:5: note: (near initialization for '_ext_fops.write') packages/lwext4-latest/ports/rtthread/dfs_ext.c:572:5: warning: initialization of 'off_t (*)(struct dfs_file *, off_t, int)' {aka 'long int (*)(struct dfs_file *, long int, int)'} from incompatible pointer type 'int (*)(struct dfs_file *, off_t)' {aka 'int (*)(struct dfs_file *, long int)'} [-Wincompatible-pointer-types] 572 | dfs_ext_lseek, | ^~~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:572:5: note: (near initialization for '_ext_fops.lseek') packages/lwext4-latest/ports/rtthread/dfs_ext.c:573:5: warning: initialization of 'int (*)(struct dfs_file *, off_t)' {aka 'int (*)(struct dfs_file *, long int)'} from incompatible pointer type 'int (*)(struct dfs_file *, struct dirent *, rt_uint32_t)' {aka 'int (*)(struct dfs_file *, struct dirent *, unsigned int)'} [-Wincompatible-pointer-types] 573 | dfs_ext_getdents, | ^~~~~~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:573:5: note: (near initialization for '_ext_fops.truncate') packages/lwext4-latest/ports/rtthread/dfs_ext.c:582:5: warning: initialization of 'int (*)(struct dfs_mnt *, long unsigned int, const void *)' from incompatible pointer type 'int (*)(struct dfs_filesystem *, long unsigned int, const void *)' [-Wincompatible-pointer-types] 582 | dfs_ext_mount, | ^~~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:582:5: note: (near initialization for '_ext_fs.mount') packages/lwext4-latest/ports/rtthread/dfs_ext.c:583:5: warning: initialization of 'int (*)(struct dfs_mnt *)' from incompatible pointer type 'int (*)(struct dfs_filesystem *)' [-Wincompatible-pointer-types] 583 | dfs_ext_unmount, | ^~~~~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:583:5: note: (near initialization for '_ext_fs.umount') packages/lwext4-latest/ports/rtthread/dfs_ext.c:585:5: warning: initialization of 'int (*)(struct dfs_dentry *, char *, int)' from incompatible pointer type 'int (*)(struct dfs_filesystem *, struct statfs *)' [-Wincompatible-pointer-types] 585 | dfs_ext_statfs, /* statfs */ | ^~~~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:585:5: note: (near initialization for '_ext_fs.readlink') packages/lwext4-latest/ports/rtthread/dfs_ext.c:587:5: warning: initialization of 'int (*)(struct dfs_dentry *, struct dfs_dentry *)' from incompatible pointer type 'int (*)(struct dfs_filesystem *, const char *)' [-Wincompatible-pointer-types] 587 | dfs_ext_unlink, | ^~~~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:587:5: note: (near initialization for '_ext_fs.link') packages/lwext4-latest/ports/rtthread/dfs_ext.c:588:5: warning: initialization of 'int (*)(struct dfs_dentry *)' from incompatible pointer type 'int (*)(struct dfs_filesystem *, const char *, struct stat *)' [-Wincompatible-pointer-types] 588 | dfs_ext_stat, | ^~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:588:5: note: (near initialization for '_ext_fs.unlink') packages/lwext4-latest/ports/rtthread/dfs_ext.c:589:5: warning: initialization of 'int (*)(struct dfs_dentry *, const char *, const char *)' from incompatible pointer type 'int (*)(struct dfs_filesystem *, const char *, const char *)' [-Wincompatible-pointer-types] 589 | dfs_ext_rename | ^~~~~~~~~~~~~~ packages/lwext4-latest/ports/rtthread/dfs_ext.c:589:5: note: (near initialization for '_ext_fs.symlink') CC build/packages/lwext4-latest/src/ext4_ialloc.o packages/lwext4-latest/ports/rtthread/dfs_ext.c: In function 'dfs_ext_init': packages/lwext4-latest/ports/rtthread/dfs_ext.c:605:18: warning: passing argument 1 of 'dfs_register' from incompatible pointer type [-Wincompatible-pointer-types] 605 | dfs_register(&_ext_fs); | ^~~~~~~~ | | | const struct dfs_filesystem_ops * In file included from packages/lwext4-latest/ports/rtthread/dfs_ext.c:18: /home/abscom/Documents/rtthread/rt-thread/components/dfs/dfs_v2/include/dfs_fs.h:87:46: note: expected 'struct dfs_filesystem_type *' but argument is of type 'const struct dfs_filesystem_ops *' 87 | int dfs_register(struct dfs_filesystem_type *fs); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ CC build/packages/lwext4-latest/src/ext4_inode.o scons: *** [build/packages/lwext4-latest/ports/rtthread/dfs_ext.o] Error 1 scons: building terminated because of errors. ``` 问题目前看是在lwext4-latest/ports/dfs_ext.c下 ``` rt_inline const char *get_fd_file(struct dfs_file *fd) { const char *fn = NULL; if (fd) { #if (RTTHREAD_VERSION >= RT_VERSION_CHECK(5, 0, 0)) fn = fd->vnode->fullpath; #成员变量fullpath只在dfs_v1的dfs_vnode结构体中出现,dfs_v2下没有 #else fn = fd->path; #endif } return fn; } ``` 目前看是dfs_v2和lwext4不兼容导致,但是RT_USING_SMART下目前好像只能配置dfs_v2? 所以想问下大家这个问题应该如何解决?谢谢 参考: - https://club.rt-thread.org/ask/article/aded09fe3b69d551.html - https://club.rt-thread.org/ask/question/45035ac50244a408.html
查看更多
1
个回答
默认排序
按发布时间排序
bernard
2024-10-10
这家伙很懒,什么也没写!
这个可以先适配,使用efm fatfs
撰写答案
登录
注册新账号
关注者
0
被浏览
228
关于作者
TerryShe
这家伙很懒,什么也没写!
提问
1
回答
0
被采纳
0
关注TA
发私信
相关问题
1
rt-smart发布时间
2
rt-smart qemu-vexpress-a9 编译报错
3
rt-smart分支编译rasp4-32bsp报错
4
rt-smart qemu-vexpress-a9 win10编译脚本问题
5
rt-smart qemu-vexpress-a9 linux 下crtl+c
6
rt-smart + pthread 编译报错
7
rt-smart的rt_channel实现问题
8
关于rt-smart的musl-libc
9
RT-Smart Windows 编译 qemu-vexpress-a9 出错
10
用户程序在RT-Smart存在的方式
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
进行i2c驱动移植的经验总结
2
在VSCode中使用clang-format
3
我该如何使用这个微雪的WIFI400 WIFI-LPB-100在rtt里或者我该怎样为它开发驱动
4
在GD32F470Z的RTC适配笔记
5
RT Thread 源码笔记 :内存池
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
I2C_IIC
UART
WIZnet_W5500
ota在线升级
freemodbus
PWM
flash
cubemx
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
编译报错
Debug
rt_mq_消息队列_msg_queue
SFUD
msh
keil_MDK
ulog
C++_cpp
MicroPython
本月问答贡献
出出啊
1517
个答案
342
次被采纳
小小李sunny
1444
个答案
289
次被采纳
张世争
808
个答案
174
次被采纳
crystal266
547
个答案
161
次被采纳
whj467467222
1222
个答案
148
次被采纳
本月文章贡献
catcatbing
3
篇文章
4
次点赞
qq1078249029
2
篇文章
2
次点赞
xnosky
2
篇文章
1
次点赞
Woshizhapuren
1
篇文章
5
次点赞
YZRD
1
篇文章
2
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部