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.
When adding a USB interface in sysconfig, I get the following compiler error:
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";
Which is somehow strange as the sysconfig generated file ti_usblib_config.h contains an include for <ti/devices/msp432e4/inc/msp432.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__ */
So using a __MSP432E401Y_, it should resolve to that condition. Why do I get the error?
Clean and rebuild does not help.
Hi,
There are a few usb examples in C:\ti\simplelink_msp432e4_sdk_4_20_00_12\examples\rtos\MSP_EXP432E401Y\usblib. I just tried to import the usb_serial_device example and build it. I don't see any compilation issue. The example project has the usb_serial_device.syscfg. I will suggest you start with a working example and modify per your application requirement.
Hi Charles,
The difference between the samples in the usblib folder and my project (which was originally based on buttonled) was the missing DEFINES for the MCU type in the .project file.
The first two lines are identical, by adding the last two lines which were missing, it works.
<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>
In any case it would be useful if syscfg was automatically setting these quite essential defines automatically when the respective MCU is being selected.
Regards
Peter