Hi , i created a new project and added usb software SDK component , USB Device class CDC, for FRDM-MCXA153 in MCUXprresso IDE. I want to implement a simple usb send transfer from device to host to replace my UART0 debug printf. I am trying to send a message from device to host in a while(1) loop in main() with a delay.
When i use a function USB_DeviceCdcAcmSend() in main() , it gives me error when i compile :
"undefined reference to `USB_DeviceCdcAcmSend' ".
i have also checked the include paths for all required headers in project settings.
It would be of great help to me if you please let me know how to integrate USB CDC device stack into any project and how to avoid undefined reference errors. please find below the attached project
Solved! Go to Solution.
Hello @Gurunath
Please change
/*! @brief CDC ACM instance count */
#ifndef USB_DEVICE_CONFIG_CDC_ACM
#define USB_DEVICE_CONFIG_CDC_ACM (0U)
to
/*! @brief CDC ACM instance count */
#ifndef USB_DEVICE_CONFIG_CDC_ACM
#define USB_DEVICE_CONFIG_CDC_ACM (1U)
Then rebuild your project.
BR
Alice
thank you It solved the error
Hello @Gurunath
Please change
/*! @brief CDC ACM instance count */
#ifndef USB_DEVICE_CONFIG_CDC_ACM
#define USB_DEVICE_CONFIG_CDC_ACM (0U)
to
/*! @brief CDC ACM instance count */
#ifndef USB_DEVICE_CONFIG_CDC_ACM
#define USB_DEVICE_CONFIG_CDC_ACM (1U)
Then rebuild your project.
BR
Alice