FULL SPEED USB [FRDM-MCXA153] - importing USB stack to new project giving error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

FULL SPEED USB [FRDM-MCXA153] - importing USB stack to new project giving error

跳至解决方案
1,186 次查看
Gurunath
Contributor II

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

 

标签 (2)
0 项奖励
回复
1 解答
1,140 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

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)

Alice_Yang_0-1722854164737.png

Then rebuild your project. 

 

BR

Alice

 

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,135 次查看
Gurunath
Contributor II

thank you It solved the error

0 项奖励
回复
1,141 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

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)

Alice_Yang_0-1722854164737.png

Then rebuild your project. 

 

BR

Alice

 

0 项奖励
回复