移植usb slave实验 出现了好多错误 谁遇到过呢?

2019-07-20 08:35发布

[mw_shl_code=applescript,true]*** Using Compiler 'V5.06 update 3 (build 300)', folder: 'C:Keil_v5ARMARMCCBin'
Rebuild target 'm1_lcd'
compiling stm32f4xx_it.c...
compiling stm32f4xx_hal_msp.c...
compiling main.c...
..USBSTM32_USB_OTG_Driverincusb_defines.h(62): warning:  #47-D: incompatible redefinition of macro "USB_OTG_SPEED_FULL" (declared at line 254 of "..HALLIBSTM32F4xx_HAL_DriverIncstm32f4xx_ll_usb.h")
  #define USB_OTG_SPEED_FULL      1
..USBSTM32_USB_OTG_Driverincusb_defines.h(121): warning:  #47-D: incompatible redefinition of macro "DSTS_ENUMSPD_HS_PHY_30MHZ_OR_60MHZ" (declared at line 281 of "..HALLIBSTM32F4xx_HAL_DriverIncstm32f4xx_ll_usb.h")
  #define DSTS_ENUMSPD_HS_PHY_30MHZ_OR_60MHZ     0
..USBSTM32_USB_OTG_Driverincusb_defines.h(122): warning:  #47-D: incompatible redefinition of macro "DSTS_ENUMSPD_FS_PHY_30MHZ_OR_60MHZ" (declared at line 282 of "..HALLIBSTM32F4xx_HAL_DriverIncstm32f4xx_ll_usb.h")
  #define DSTS_ENUMSPD_FS_PHY_30MHZ_OR_60MHZ     1
..USBSTM32_USB_OTG_Driverincusb_defines.h(123): warning:  #47-D: incompatible redefinition of macro "DSTS_ENUMSPD_LS_PHY_6MHZ" (declared at line 283 of "..HALLIBSTM32F4xx_HAL_DriverIncstm32f4xx_ll_usb.h")
  #define DSTS_ENUMSPD_LS_PHY_6MHZ               2
..USBSTM32_USB_OTG_Driverincusb_defines.h(124): warning:  #47-D: incompatible redefinition of macro "DSTS_ENUMSPD_FS_PHY_48MHZ" (declared at line 284 of "..HALLIBSTM32F4xx_HAL_DriverIncstm32f4xx_ll_usb.h")
  #define DSTS_ENUMSPD_FS_PHY_48MHZ              3
..USBSTM32_USB_OTG_Driverincusb_core.h(85): error:  #101: "HC_IDLE" has already been declared in the current scope
    HC_IDLE = 0,
..USBSTM32_USB_OTG_Driverincusb_core.h(98): error:  #101: "URB_DONE" has already been declared in the current scope
    URB_DONE,
..USBSTM32_USB_OTG_Driverincusb_core.h(99): error:  #101: "URB_NOTREADY" has already been declared in the current scope
    URB_NOTREADY,
..USBSTM32_USB_OTG_Driverincusb_core.h(100): error:  #101: "URB_ERROR" has already been declared in the current scope
    URB_ERROR,
..USBSTM32_USB_OTG_Driverincusb_core.h(101): error:  #101: "URB_STALL" has already been declared in the current scope
    URB_STALL
main.c(73): warning:  #177-D: variable "offline_cnt" was declared but never referenced
  
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
6条回答
chun307
1楼-- · 2019-07-20 11:39
 精彩回答 2  元偷偷看……
chun307
2楼-- · 2019-07-20 16:28
 精彩回答 2  元偷偷看……
599956589
3楼-- · 2019-07-20 17:03
碰到同样的问题了,按照你说的方法解决了,不过不知道为什么?
chun307
4楼-- · 2019-07-20 21:16
 精彩回答 2  元偷偷看……
599956589
5楼-- · 2019-07-21 01:31
对,完全理解不了,现在只想先会用
无字幕CD
6楼-- · 2019-07-21 02:25
难道就只有我们遇到这样的问题吗?专门为了这个问题 注册了账号。。。也是像楼主一样注释掉2行宏定义就可以用了,目前F767的usb移植成功了  可以读U盘,  但是我移植到F439上使用的IAR就没移植成功,sys.h在IAR上永不了。。。

一周热门 更多>