K22F Demo App - Composite

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

K22F Demo App - Composite

跳至解决方案
1,374 次查看
corytodd
Contributor III

Hello,

I am using KDS to build out the various demos and USB demos available for the FRDM-K22F. So far everything is compiling, flashing, and operating without issue. Super impressed with the product so far and I know it is not easy to make everything work together.

The problem I am having is with the CDC/MSD composite demo. In composite_app.c there are three errors citing undefined references to:

#include "usb_class_composite.h"

...

/* Initialize the USB interface */

USB_Composite_Init(CONTROLLER_ID, &usb_composite_callback, &g_app_handle);

USB_Composite_Get_Class_Handle(g_app_handle, USB_CLASS_CDC, &g_vcom_handle);

USB_Composite_Get_Class_Handle(g_app_handle, USB_CLASS_MSC, &g_disk.app_handle);

This header exists but there is no implementation! I've scored the KSDK folder for what the file I assume should be named "usb_class_composite.c". Has anyone successfully run this demo in KDS?

标记 (2)
0 项奖励
回复
1 解答
1,179 次查看
anthony_huereca
NXP Employee
NXP Employee

Hi Cory,

I just tried it and was able to compile successfully using KSDK 1.0. Make sure you modify C:\Freescale\KSDK_1.0.0\usb\usb_core\device\include\frdmk22f120m\usb_device_config.h inside the USB Device project, and recompile the USB Device library. The line is on line 98:

#define USBCFG_DEV_COMPOSITE              1

  It's odd that you don't see any implementation. It'll be in C:\Freescale\KSDK_1.0.0\usb\usb_core\device\sources\classes\composite\usb_composite.c on line 119.

-Anthony

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,180 次查看
anthony_huereca
NXP Employee
NXP Employee

Hi Cory,

I just tried it and was able to compile successfully using KSDK 1.0. Make sure you modify C:\Freescale\KSDK_1.0.0\usb\usb_core\device\include\frdmk22f120m\usb_device_config.h inside the USB Device project, and recompile the USB Device library. The line is on line 98:

#define USBCFG_DEV_COMPOSITE              1

  It's odd that you don't see any implementation. It'll be in C:\Freescale\KSDK_1.0.0\usb\usb_core\device\sources\classes\composite\usb_composite.c on line 119.

-Anthony

0 项奖励
回复
1,179 次查看
corytodd
Contributor III

Hi Anthony,

...Make sure you modify C:\Freescale\KSDK_1.0.0\usb\usb_core\device\include\frdmk22f120m\usb_device_config.h inside the USB Device project, and recompile the USB Device library.

I was failing to recompile the USB Device library! All set now, thank you very much for your help.

0 项奖励
回复