This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] MSP-EXP432E401Y:"未能匹配默认的 include 文件"添加 USBLIB 时

Guru**** 2130340 points
Other Parts Discussed in Thread: MSP432E401Y, SYSCONFIG
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1290108/msp-exp432e401y-failed-to-match-a-default-include-file-when-adding-usblib

器件型号:MSP-EXP432E401Y
主题中讨论的其他器件:SysConfigMSP432E411Y、MSP432E401Y

在 SysConfig 中添加 USB 接口时、出现以下编译器错误:

Fullscreen
1
2
3
subdir_rules.mk:26: recipe for target 'syscfg/ti_usblib_config.obj' failed
"C:/ti/simplelink_msp432e4_sdk_4_20_00_12/source/ti/devices/msp432e4/inc/msp432.h", line 53: fatal error #35: #error directive: "Failed to match a default include file"
1 catastrophic error detected in the compilation of "syscfg/ti_usblib_config.c".
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "MSP432E" --package "128 Pin QFP|32x32" --part "MSP432E401YTPDT" --product "simplelink_msp432e4_sdk@4.20.00.12"
* @versions {"tool":"1.17.0+3128"}
*/
const Settings = scripting.addModule("/ti/usblib/Settings", {}, false);
const Settings1 = Settings.addInstance();
Settings1.$name = "CONFIG_USB_0";
Settings1.usb.$assign = "USB0";
Settings1.usb.dmPin.$assign = "PL7";
Settings1.usb.dpPin.$assign = "PL6";
Settings1.usb.idPin.$assign = "PB0";
Settings1.usb.vbusPin.$assign = "PB1";
Settings1.stringDescriptor.$name = "usb_string0";
Settings1.configuration.$name = "usb_configuration0";
Settings1.configuration.hid.$name = "usb_hid0";
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

这有点奇怪、因为 SysConfig 生成的文件 ti_usblib_config.h 包含  :

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
******************************************************************************/
#ifndef __MSP432_H__
#define __MSP432_H__
/******************************************************************************
* MSP432 devices *
******************************************************************************/
#if defined (__MSP432E411Y__)
#include "msp432e411y.h"
#elif defined (__MSP432E401Y__)
#include "msp432e401y.h"
/******************************************************************************
* Failed to match a default include file *
******************************************************************************/
#else
#error "Failed to match a default include file"
#endif
#endif /* __MSP432_H__ */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

因此、使用 _MSP432E401Y_时、它应该会解析为该条件。 为什么会得到误差?

清洁和重建不起作用。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

      C:\ti\simplelink_msp432e4_SDK_4_20_00_12\examples\rtos\MSP_EXP432E401Y\usblib 中有几个 USB 示例。 我尝试导入 USB_serial_device 示例并进行构建。 我看不出任何编译问题。 示例项目具有 usb_serial_device.syscfg。 我将建议您从一个工作示例开始、并根据您的应用要求进行修改。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Charles:

    usblib 文件夹中的示例和我的项目(最初基于 buttonled)之间的区别是.project 文件中缺少 MCU 类型的定义。

    前两行是相同的,添加缺失的最后两行,它工作.

    Fullscreen
    1
    2
    3
    4
    5
    6
    <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.MSP432_20.2.compilerID.DEFINE.1188864034" superClass="com.ti.ccstudio.buildDefinitions.MSP432_20.2.compilerID.DEFINE" valueType="definedSymbols">
    <listOptionValue builtIn="false" value="${INHERITED_SYMBOLS}"/>
    <listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_SYMBOLS}"/>
    <listOptionValue builtIn="false" value="DeviceFamily_MSP432E4"/>
    <listOptionValue builtIn="false" value="__MSP432E401Y__"/>
    </option>
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    在任何情况下、 当选择相应的 MCU 时、如果 syscfg 自动设置这些非常重要的定义、会很有用。

    此致
    彼得