SDK Version: SDK_2.x_LPC5516 version 2.16.000
MCUXpresso version: 11.9.0
SDK component(s):
Problem: Using the debug_console SDK utility in kSerialPort_UsbCdc mode fails.
Several of the global variables and defines that fsl_component_serial_port_usb.c rely upon are heavily decorated on the LPC5516 due to there being two USB ports.
For example at line 178 in fsl_component_serial_port_usb.c there is the following definition expecting a global usb_device_class_struct_t named g_UsbDeviceCdcVcomConfig:
/* USB device class information */
static usb_device_class_config_struct_t s_cdcAcmConfig[1] = {{
USB_DeviceCdcVcomCallback,
0,
&g_UsbDeviceCdcVcomConfig,
}};
However in usb_device_descriptor.c, which is installed as part of the same SDK component, the struct seems to be declared with the name g_UsbDeviceInterface0CicVcomConfig instead.
usb_device_class_struct_t g_UsbDeviceInterface0CicVcomConfig = {
g_UsbDeviceInterface0CicVcomInterfaceList,
kUSB_DeviceClassTypeCdc,
USB_DEVICE_CONFIGURATION_COUNT,
};
It looks like the serial_port component is expecting variables to be decorated with "UsbDeviceCdc" but the globals are actually decorated with "UsbDeviceInterface0Cic"
How would you suggest I handle this? Is there a way to change the decoration for the generated code, or should I modify the component source code directly?
Thanks!
Solved! Go to Solution.
Ah I see what you mean, the "dev_cdc_vcom_bm" has a version of "usb_device_descriptor.c" that has things named correctly. I'll use that then.
Ah I see what you mean, the "dev_cdc_vcom_bm" has a version of "usb_device_descriptor.c" that has things named correctly. I'll use that then.
This is a bug report of sorts.
It seems like the best path forward is to delete the "usb_cdc_adapter" that gets added by the SDK component manager and add our own modified one that matches the expected naming convention of fsl_component_serial_port_usb.c
Most of the tools added by the SDK manager work with very little configuration (or by modifying a few defines). I assumed that since this one was broken in its default state that there may be something I was missing.
Hello @wilkinsw
To better solve your problem, please tell me what project you want to develop.
And you can also refer to the SDK demo "dev_cdc_vcom_bm" . The Virtual COM project is a simple demonstration program based on the MCUXpresso SDK. It is enumerated as a COM
port, which the users can open using terminal tools, such as TeraTerm. The demo echoes back any character it receives. The purpose of this demo is to show how to build a device of USB CDC class and to provide a simple project for further development.
BR
Alice