请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:MSP-EXP432E401Y 主题中讨论的其他器件:SysConfig、 MSP432E411Y、MSP432E401Y
在 SysConfig 中添加 USB 接口时、出现以下编译器错误:
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".
/** * 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";
这有点奇怪、因为 SysConfig 生成的文件 ti_usblib_config.h 包含 :
******************************************************************************/ #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__ */
因此、使用 _MSP432E401Y_时、它应该会解析为该条件。 为什么会得到误差?
清洁和重建不起作用。