开源改变世界!!

使用 SD 卡支持构建失败。 #108

推推 grbl 2年前 (2023-02-08) 184次浏览
关闭
errolt 打开了这个问题 上星期 · 3条评论
关闭

使用 SD 卡支持构建失败。#108

errolt 打开了这个问题 上星期 · 3条评论

评论

使用 SD 卡支持构建失败。 #108
错误 评论了 上星期

当我尝试向构建添加对 sdcard 的支持时(FatFS 已经包含所有文件,修改 platformio.ini 以包括 sdcard 和 fatfs 支持)构建失败:

sdcard/fs_fatfs.c:43:10: fatal error: ff.h: No such file or directory

************************************************************
* Looking for ff.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:ff.h"
* Web  > https://registry.platformio.org/search?q=header:ff.h
*
************************************************************

 #include "ff.h"
          ^~~~~~
compilation terminated.

附言。platformio.ini 文件包含这个似乎不再适用?FatFS 文件夹已经包含所有文件,并且 FatFS/README.md 不再存在。

# To enable support for SD card, you must grab a copy FatFS:
#   curl -O http://elm-chan.org/fsw/ff/arc/ff14b.zip
#   unzip ff14b.zip 'source/*'
#   mv source/* FatFS
#   rm -fr ff14b.zip source FatFS/diskio.c
# Next, apply the changes outlined in FatFS/README.md and then

使用 SD 卡支持构建失败。 #108
贡献者
terjeio 评论了 上星期

使用Linux?此行大小写不正确,改为 -I FatFs

使用 SD 卡支持构建失败。 #108
作者
错误 评论了 上星期

使用Linux?此行大小写不正确,改为 -I FatFs

呵呵。应该看到那个。谢谢。

现在这是一个新错误,但我会尝试自己找到问题,因为函数在那里,但链接器没有找到它。

Linking .pio/build/btt_skr_pro_1_1/firmware.elf
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_getfree':
fs_fatfs.c:(.text.fs_getfree+0xa): undefined reference to `f_getfree'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_utime':
fs_fatfs.c:(.text.fs_utime+0x32): undefined reference to `f_utime'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_stat':
fs_fatfs.c:(.text.fs_stat+0x8): undefined reference to `f_stat'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_readdir':
fs_fatfs.c:(.text.fs_readdir+0x12): undefined reference to `f_readdir'
fs_fatfs.c:(.text.fs_readdir+0x50): undefined reference to `f_readdir'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_opendir':
fs_fatfs.c:(.text.fs_opendir+0x12): undefined reference to `f_opendir'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_chdir':
fs_fatfs.c:(.text.fs_chdir+0x2): undefined reference to `f_chdir'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_mkdir':
fs_fatfs.c:(.text.fs_mkdir+0x2): undefined reference to `f_mkdir'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_unlink':
fs_fatfs.c:(.text.fs_unlink+0x2): undefined reference to `f_unlink'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_rename':
fs_fatfs.c:(.text.fs_rename+0x2): undefined reference to `f_rename'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_seek':
fs_fatfs.c:(.text.fs_seek+0x4): undefined reference to `f_lseek'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_write':
fs_fatfs.c:(.text.fs_write+0x16): undefined reference to `f_write'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_read':
fs_fatfs.c:(.text.fs_read+0xe): undefined reference to `f_read'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_close':
fs_fatfs.c:(.text.fs_close+0x6): undefined reference to `f_close'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_open':
fs_fatfs.c:(.text.fs_open+0x22): undefined reference to `f_open'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_getcwd':
fs_fatfs.c:(.text.fs_getcwd+0x6): undefined reference to `f_getcwd'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/fs_fatfs.o: In function `fs_closedir':
fs_fatfs.c:(.text.fs_closedir+0x8): undefined reference to `f_closedir'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/sdcard.o: In function `sd_cmd_unmount':
sdcard.c:(.text.sd_cmd_unmount+0x28): undefined reference to `f_mount'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/sdcard.o: In function `sd_cmd_unlink':
sdcard.c:(.text.sd_cmd_unlink+0xc): undefined reference to `f_unlink'
.pio/build/btt_skr_pro_1_1/libaa9/sdcard/sdcard.o: In function `sdcard_mount':
sdcard.c:(.text.sdcard_mount+0x3a): undefined reference to `f_mount'