When I use MDK 5.10 USB custom class ,build error:
D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(23): error: #20: identifier "USBD_CUSTOM_CLASS0_IF0_EN" is undefined uint8_t usbd0_alt_setting [USBD0_IF_CNT]; D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(23): error: #20: identifier "USBD_CUSTOM_CLASS0_IF0_ALT" is undefined uint8_t usbd0_alt_setting [USBD0_IF_CNT]; D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(23): error: #20: identifier "USBD_CUSTOM_CLASS0_IF1_EN" is undefined uint8_t usbd0_alt_setting [USBD0_IF_CNT]; D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(23): error: #20: identifier "USBD_CUSTOM_CLASS0_IF1_ALT" is undefined uint8_t usbd0_alt_setting [USBD0_IF_CNT]; D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(23): error: #20: identifier "USBD_CUSTOM_CLASS0_IF2_EN" is undefined uint8_t usbd0_alt_setting [USBD0_IF_CNT]; D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(23): error: #20: identifier "USBD_CUSTOM_CLASS0_IF2_ALT" is undefined uint8_t usbd0_alt_setting [USBD0_IF_CNT]; D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(23): error: #20: identifier "USBD_CUSTOM_CLASS0_IF3_EN" is undefined uint8_t usbd0_alt_setting [USBD0_IF_CNT]; D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(23): error: #20: identifier "USBD_CUSTOM_CLASS0_IF3_ALT" is undefined uint8_t usbd0_alt_setting [USBD0_IF_CNT]; D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(28): error: #28: expression must have a constant value usbd0_alt_setting, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF0_EP_BULK_OUT_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF0_EP_BULK_IN_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF0_EP_INT_OUT_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF0_EP_INT_IN_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF0_EP_ISO_OUT_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF0_EP_ISO_IN_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF1_EP_BULK_OUT_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF1_EP_BULK_IN_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF1_EP_INT_OUT_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF1_EP_INT_IN_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF1_EP_ISO_OUT_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF1_EP_ISO_IN_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF2_EP_BULK_OUT_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF2_EP_BULK_IN_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF2_EP_INT_OUT_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF2_EP_INT_IN_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF2_EP_ISO_OUT_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF2_EP_ISO_IN_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF3_EP_BULK_OUT_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF3_EP_BULK_IN_EN" is undefined USBD0_EP_CNT, D:\Keil\ARM\Pack\Keil\MDK-Middleware\5.1.4\USB\Include\usbd_config_dev_0.c(34): error: #20: identifier "USBD_CUSTOM_CLASS0_IF3_EP_INT_OUT_EN" is undefined USBD0_EP_CNT, RTE\USB\USBD_Config_0.c: 0 warnings, 30 errors
View all questions in Keil forum