开源改变世界!!

PlatformIO 将 teensy 平台从 4.12 更新到 4.13,现在从 SD 模块获取编译错误 #47

推推 grbl 2年前 (2023-02-08) 163次浏览
关闭
5ocworkshop 开了这个issue 2021 年 7 月 27 日 · 8条评论
关闭

评论

PlatformIO 将 teensy 平台从 4.12 更新到 4.13,现在从 SD 模块获取编译错误 #47
5oc工作坊 评论了 2021 年 7 月 27 日  

PlatformIO 提示我将我的 teensy 平台从 4.12 更新到 4.13。

现在我在编译时遇到了以前没有遇到的错误(没有更新任何文件,也没有使用 SD 模块)。

我看到有一些关于为青少年编译 SD 模块的问题的历史,但由于它之前几乎是开箱即用的,我有点困惑发生了什么变化或如何解决它。

错误:

Compiling .pio\build\teensy41\lib9f7\uSDFS\utility\sd_spi.c.o
In file included from .pio\libdeps\teensy41\MSC-non-blocking\src\msc.h:31:0,
                 from .pio\libdeps\teensy41\MSC-non-blocking\src\MassStorageHost.cpp:31:
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2045:2: error: 'msSCSICapacity_t' does not name a type
  msSCSICapacity_t msCapacity;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2046:2: error: 'msInquiryResponse_t' does not name a type  
  msInquiryResponse_t msInquiry;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2047:2: error: 'msRequestSenseResponse_t' does not name a type
  msRequestSenseResponse_t msSense;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2048:2: error: 'msDriveInfo_t' does not name a type        
  msDriveInfo_t msDriveInfo;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2067:31: error: 'msSCSICapacity_t' has not been declared   
  uint8_t msReadDeviceCapacity(msSCSICapacity_t * const Capacity);
                               ^
compilation terminated due to -fmax-errors=5.
In file included from .pio\libdeps\teensy41\MSC-non-blocking\src\msc.h:31:0,
                 from .pio\libdeps\teensy41\MSC-non-blocking\src\MassStorageDriver.cpp:29:
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2045:2: error: 'msSCSICapacity_t' does not name a type     
  msSCSICapacity_t msCapacity;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2046:2: error: 'msInquiryResponse_t' does not name a type  
  msInquiryResponse_t msInquiry;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2047:2: error: 'msRequestSenseResponse_t' does not name a type
  msRequestSenseResponse_t msSense;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2048:2: error: 'msDriveInfo_t' does not name a type        
  msDriveInfo_t msDriveInfo;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2067:31: error: 'msSCSICapacity_t' has not been declared   
  uint8_t msReadDeviceCapacity(msSCSICapacity_t * const Capacity);
                               ^
compilation terminated due to -fmax-errors=5.
Compiling .pio\build\teensy41\libd78\lwip\api\api_lib.c.o
In file included from .pio\libdeps\teensy41\MSC-non-blocking\src/msc.h:31:0,
                 from .pio\libdeps\teensy41\uSDFS\src\utility\sd_msc.cpp:41:
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2045:2: error: 'msSCSICapacity_t' does not name a type     
  msSCSICapacity_t msCapacity;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2046:2: error: 'msInquiryResponse_t' does not name a type
  msInquiryResponse_t msInquiry;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2047:2: error: 'msRequestSenseResponse_t' does not name a type
  msRequestSenseResponse_t msSense;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2048:2: error: 'msDriveInfo_t' does not name a type        
  msDriveInfo_t msDriveInfo;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2067:31: error: 'msSCSICapacity_t' has not been declared   
  uint8_t msReadDeviceCapacity(msSCSICapacity_t * const Capacity);
                               ^
compilation terminated due to -fmax-errors=5.
*** [.pio\build\teensy41\lib5ae\MSC-non-blocking\MassStorageHost.cpp.o] Error 1
*** [.pio\build\teensy41\lib5ae\MSC-non-blocking\MassStorageDriver.cpp.o] Error 1
*** [.pio\build\teensy41\lib9f7\uSDFS\utility\sd_msc.cpp.o] Error 1
=============================================================== [FAILED] Took 4.48 seconds ===============================================================
PlatformIO 将 teensy 平台从 4.12 更新到 4.13,现在从 SD 模块获取编译错误 #47
作者

看来这个新更新是在过去 12 小时内才推出的,并将 Teensyduino 升级到 1.54,我认为这是基于阅读此处注释的可能冲突来源。

我正在研究如何强制 PlatformIO 回到他们的 teensy 包的 4.12 版本。

PlatformIO 将 teensy 平台从 4.12 更新到 4.13,现在从 SD 模块获取编译错误 #47
作者

PlatformIO IDE > PIO 主页 > 平台 > Embedded > Teensy > Changelog

在页面顶部附近,您可以选择安装 4.12。

然后你需要进入:

PIO > Quick Access > Projects & Configurations > 选择你的 grblHAL 项目 > teensy41(最右边的选项卡)

在“平台”字段中附加 @4.12,因此该字段显示为:
${common_teensy.platform}@4.12

清除并再次尝试构建,您应该会在构建窗口输出的顶部看到平台声明为 4.12 而不是 4.13。

PlatformIO 将 teensy 平台从 4.12 更新到 4.13,现在从 SD 模块获取编译错误 #47

我收到了类似的错误,并且也能够通过恢复到 4.12 版本来解决它。

In file included from .pio\libdeps\teensy41\MSC-non-blocking\src\msc.h:31:0,
                 from .pio\libdeps\teensy41\MSC-non-blocking\src\MassStorageDriver.cpp:29:
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2045:2: error: 'msSCSICapacity_t' does not name a type
  msSCSICapacity_t msCapacity;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2046:2: error: 'msInquiryResponse_t' does not name a type
  msInquiryResponse_t msInquiry;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2047:2: error: 'msRequestSenseResponse_t' does not name a type
  msRequestSenseResponse_t msSense;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2048:2: error: 'msDriveInfo_t' does not name a type
  msDriveInfo_t msDriveInfo;
  ^
Compiling .pio\build\teensy41\lib13a\uSDFS\ffsystem.c.o
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2067:31: error: 'msSCSICapacity_t' has not been declared
Compiling .pio\build\teensy41\lib13a\uSDFS\ffunicode.c.o
  uint8_t msReadDeviceCapacity(msSCSICapacity_t * const Capacity);
                               ^
compilation terminated due to -fmax-errors=5.
Compiling .pio\build\teensy41\lib13a\uSDFS\utility\ff_utils.c.o
*** [.pio\build\teensy41\lib57a\MSC-non-blocking\MassStorageDriver.cpp.o] Error 1
In file included from .pio\libdeps\teensy41\MSC-non-blocking\src\msc.h:31:0,
                 from .pio\libdeps\teensy41\MSC-non-blocking\src\MassStorageHost.cpp:31:
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2045:2: error: 'msSCSICapacity_t' does not name a type
  msSCSICapacity_t msCapacity;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2046:2: error: 'msInquiryResponse_t' does not name a type
  msInquiryResponse_t msInquiry;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2047:2: error: 'msRequestSenseResponse_t' does not name a type
  msRequestSenseResponse_t msSense;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2048:2: error: 'msDriveInfo_t' does not name a type
  msDriveInfo_t msDriveInfo;
  ^
C:\Users\xxxxx\.platformio\packages\framework-arduinoteensy\libraries\USBHost_t36/USBHost_t36.h:2067:31: error: 'msSCSICapacity_t' has not been declared
  uint8_t msReadDeviceCapacity(msSCSICapacity_t * const Capacity);
                               ^
compilation terminated due to -fmax-errors=5.
*** [.pio\build\teensy41\lib57a\MSC-non-blocking\MassStorageHost.cpp.o] Error 1
========================================================================================================================================= [FAILED] Took 7.88 seconds =========================================================================================================================================
PlatformIO 将 teensy 平台从 4.12 更新到 4.13,现在从 SD 模块获取编译错误 #47

从头开始并遵循有关库和补丁的所有说明(包括文件中的一些#define 更改)。现在我觉得,我离目的地很近了。以下是构建过程的最后几行:

归档 .pio/build/teensy41/libFrameworkArduino.a
索引 .pio/build/teensy41/libFrameworkArduino.a
链接 .pio/build/teensy41/firmware.elf
.pio/build/teensy41/libd3a/libuSDFS.a(diskio.co) : 在函数disk_status': /Users/karoria/Documents/GitHub/iMXRT1062/grblHAL_Teensy4/.pio/libdeps/teensy41/uSDFS/src/diskio.c:36: undefined reference to MSC_disk_status’
/Users/karoria/Documents/GitHub/iMXRT1062/grblHAL_Teensy4/.pio/libdeps/teensy41/uSDFS/src/diskio.c:33: undefined reference to MSC_disk_status' .pio/build/teensy41/libd3a/libuSDFS.a(diskio.c.o): In function disk_initialize’:
/Users/karoria/Documents/GitHub/ iMXRT1062/grblHAL_Teensy4/.pio/libdeps/teensy41/uSDFS/src/diskio.c:79: 未定义对MSC_disk_initialize' /Users/karoria/Documents/GitHub/iMXRT1062/grblHAL_Teensy4/.pio/libdeps/teensy41/uSDFS/src/diskio.c:72: undefined reference to MSC_disk_initialize 的引用’
.pio/build/teensy41/libd3a/libuSDFS.a(diskio.co): 在函数disk_read': /Users/karoria/Documents/GitHub/iMXRT1062/grblHAL_Teensy4/.pio/libdeps/teensy41/uSDFS/src/diskio.c:133: undefined reference to MSC_disk_read’
/Users/karoria/Documents/GitHub/iMXRT1062/grblHAL_Teensy4/.pio/libdeps/teensy41/uSDFS/src/diskio.c:124:未定义对MSC_disk_read' .pio/build/teensy41/libd3a/libuSDFS.a(diskio.c.o): In function disk_write 的引用:
/Users/karoria/Documents/GitHub/iMXRT1062/grblHAL_Teensy4/。 pio/libdeps/teensy41/uSDFS/src/diskio.c:192: 未定义对MSC_disk_write' /Users/karoria/Documents/GitHub/iMXRT1062/grblHAL_Teensy4/.pio/libdeps/teensy41/uSDFS/src/diskio.c:183: undefined reference to MSC_disk_write 的引用’
.pio/build/teensy41/libd3a/libuSDFS.a(diskio.co): 在函数disk_ioctl': /Users/karoria/Documents/GitHub/iMXRT1062/grblHAL_Teensy4/.pio/libdeps/teensy41/uSDFS/src/diskio.c:353: undefined reference to MSC_ioctl’
/Users/karoria/Documents/ GitHub/iMXRT1062/grblHAL_Teensy4/.pio/libdeps/teensy41/uSDFS/src/diskio.c:346:未定义对“MSC_ioctl”的引用
collect2:错误:ld 返回 1 退出状态
*** [.pio/build/teensy41/firmware .elf] 错误 1
​​============================== [失败] 耗时 60.54 秒 ========= =====================

环境状态持续时间


teensy41 失败 00:01:00.536
========================= 1 失败,0 成功 00:01:00.536 ======= ==================
终端进程“platformio ‘run’”以退出代码终止:1。

终端将被任务重用,按任意键关闭它。

PlatformIO 将 teensy 平台从 4.12 更新到 4.13,现在从 SD 模块获取编译错误 #47
贡献者

你有旧版本的 uSDFS 库吗?请检查并可能更改库中的设置,如此处所述

PlatformIO 将 teensy 平台从 4.12 更新到 4.13,现在从 SD 模块获取编译错误 #47

好的。我正在使用由 PIO 自动获取的 uSDFS 库。将其更改为链接中的建议。仍然没有运气,但越来越近了:

执行任务:platformio run <

处理teensy41(主板:teensy41;平台:teensy@4.12;框架:arduino)

可以通过-v, --verbose选项
配置启用详细模式:https
://docs.platformio.org/page/boards/teensy/teensy41.html 平台:Teensy (4.12.0) > Teensy 4.1
硬件:IMXRT1062 600MHz、512KB RAM、7.75MB 闪存
调试:当前(jlink)外部(jlink)
包:

  • 框架-arduinoteensy 1.153.0 (1.53)
  • toolchain-gccarmnoneeabi 1.50401.190816 (5.4.1)
    LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    找到 93 个兼容库
    扫描依赖…
    依赖图
    |– 1.1.2+sha.52b0ae3
    | |– 1.0.0+sha.5a2e6f4
    | | |– <USBHost_t36> 0.1
    |– 1.0.0+sha.5a2e6f4
    | |– <USBHost_t36> 0.1
    |– 2.0.2+sha.58c266f
    |– 2.0.2
    在发布模式下
    构建链接 .pio/build/teensy41/firmware.elf
    .pio/build/teensy41/src/networking/vfs .co: 在函数vfs_getcwd': /Users/karoria/Documents/GitHub/iMXRT1062/grblHAL_Teensy4/src/networking/vfs.c:155: undefined reference to f_getcwd’
    collect2: error: ld 返回 1 退出状态
    *** [.pio/build/teensy41/firmware.elf] 错误 1
    ​​====================== [失败] 耗时 5.99 秒 ===== =================

环境状态持续时间


teensy41 失败 00:00:05.988
================= 1 失败,0 成功 00:00:05.988 =============== ==
终端进程“platformio ‘run’”以退出代码终止:1。

终端将被任务重用,按任意键关闭它。

PlatformIO 将 teensy 平台从 4.12 更新到 4.13,现在从 SD 模块获取编译错误 #47
贡献者

好的,这个是我的 -必须在 uSDFS 库的src/ffconf.hFF_FS_RPATH中设置为 2 。我将不得不添加一个注释。

PIO 显然链接到旧版本的 uSDFS 库,因为您必须将 USE_MSC 设置为 0,因为它在最新版本中已更改为 0 。我不知道这是否有问题。

PlatformIO 将 teensy 平台从 4.12 更新到 4.13,现在从 SD 模块获取编译错误 #47

好的,这个是我的 -必须在 uSDFS 库的src/ffconf.hFF_FS_RPATH中设置为 2 。我将不得不添加一个注释。

PIO 显然链接到旧版本的 uSDFS 库,因为您必须将 USE_MSC 设置为 0,因为它在最新版本中已更改为 0 。我不知道这是否有问题。

成功!!经过上述更改。感谢您的宝贵时间和一如既往的支持。现在将与 Teensy4.1 和 grblHAL 一起玩。