我有Am-1808,我需要按照here解释从usb而不是sd-card启动。以前我使用的是Davinci-PSP-SDK-03.21.00.4,但是这个psp的uboot没有usb支持(我通过在uboot菜单中键入'help'来证实这一点,并且它没有'usb'命令可用)。所以我从denx tree下载了u-boot,它在u-boot菜单中有'usb'命令,然后我按照Ti employee的建议在da850evm.h中添加了usb配置。这是配置:
/*
* USB configuration
*/
#define CONFIG_USB_DA8XX /* Platform hookup to MUSB controller */
#define CONFIG_MUSB_UDC
#ifdef CONFIG_USB_DA8XX
#ifdef CONFIG_MUSB_HCD /* include support for usb host */
#define CONFIG_CMD_USB /* include support for usb cmd */
#define CONFIG_USB_STORAGE /* MSC class support */
#define CONFIG_CMD_STORAGE /* inclue support for usb-storage cmd */
#define CONFIG_CMD_FAT /* inclue support for FAT/storage */
#define CONFIG_DOS_PARTITION /* inclue support for FAT/storage */
#ifdef CONFIG_USB_KEYBOARD /* HID class support */
#define CONFIG_SYS_USB_EVENT_POLL
#define CONFIG_PREBOOT "usb start"
#endif /* CONFIG_USB_KEYBOARD */
#endif /* CONFIG_MUSB_HCD */
#ifdef CONFIG_MUSB_UDC
/* USB device configuration */
#define CONFIG_USB_DEVICE 1
#define CONFIG_USB_TTY 1
#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
/* Change these to suit your needs */
#define CONFIG_USBD_VENDORID 0x0451
#define CONFIG_USBD_PRODUCTID 0x5678
#define CONFIG_USBD_MANUFACTURER "Texas Instruments"
#define CONFIG_USBD_PRODUCT_NAME "DA830EVM"
#endif /* CONFIG_MUSB_UDC */
#endif /* CONFIG_USB_DA8XX */
在编译时我得到了这些错误:
usbtty.c:126: error: 'EP0_MAX_PACKET_SIZE' undeclared here (not in a function)
usbtty.c:219: error: 'UDC_INT_ENDPOINT' undeclared here (not in a function)
usbtty.c:222: error: 'UDC_INT_PACKET_SIZE' undeclared here (not in a function)
usbtty.c:245: error: 'UDC_OUT_ENDPOINT' undeclared here (not in a function)
usbtty.c:249: error: 'UDC_BULK_PACKET_SIZE' undeclared here (not in a function)
usbtty.c:256: error: 'UDC_IN_ENDPOINT' undeclared here (not in a function)
usbtty.c:328: error: 'UDC_OUT_PACKET_SIZE' undeclared here (not in a function)
usbtty.c:338: error: 'UDC_IN_PACKET_SIZE' undeclared here (not in a function)
usbtty.c: In function 'usbtty_tstc':
usbtty.c:399: warning: implicit declaration of function 'udc_unset_nak'
usbtty.c: In function 'usbtty_getc':
usbtty.c:424: warning: implicit declaration of function 'udc_set_nak'
usbtty.c: In function 'drv_usbtty_init':
usbtty.c:553: warning: implicit declaration of function 'udc_init'
usbtty.c:560: warning: implicit declaration of function 'udc_startup_events'
usbtty.c:561: warning: implicit declaration of function 'udc_connect'
usbtty.c: In function 'usbtty_init_instances':
usbtty.c:683: warning: implicit declaration of function 'udc_setup_ep'
usbtty.c: In function 'write_buffer':
usbtty.c:846: warning: implicit declaration of function 'udc_endpoint_write'
usbtty.c: In function 'usbtty_poll':
usbtty.c:989: warning: implicit declaration of function 'udc_irq'
make[1]: *** [usbtty.o] Error 1
make[1]: Leaving directory `/home/user/Desktop/Uboot_Screwed/u-boot- omapl1/drivers/serial'
make: *** [drivers/serial/libserial.a] Error 2
如果你能告诉我怎样才能摆脱这些错误,[我用Google搜索但没有找到任何有用的东西]或者如果你能给我一个u-boot的链接给Am-1808有'在u-boot菜单中支持usb'命令。
更新
我在da850evm.h中定义了CONFIG_USB_TTY,因为auselen指出,现在我能够解决以前的错误,但是我得到了新的错误,这里是终端的输出:
drivers/serial/libserial.a(usbtty.o): In function `write_buffer':
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/drivers/serial/usbtty.c:846: undefined reference to `udc_endpoint_write'
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/drivers/serial/usbtty.c:890: undefined reference to `udc_endpoint_write'
drivers/serial/libserial.a(usbtty.o): In function `usbtty_poll':
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/drivers/serial/usbtty.c:989: undefined reference to `udc_irq'
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/drivers/serial/usbtty.c:999: undefined reference to `udc_irq'
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/drivers/serial/usbtty.c:1009: undefined reference to `udc_irq'
drivers/serial/libserial.a(usbtty.o): In function `usbtty_init_endpoints':
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/drivers/serial/usbtty.c:727: undefined reference to `udc_setup_ep'
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/drivers/serial/usbtty.c:727: undefined reference to `udc_setup_ep'
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/drivers/serial/usbtty.c:727: undefined reference to `udc_setup_ep'
drivers/serial/libserial.a(usbtty.o): In function `drv_usbtty_init':
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/drivers/serial/usbtty.c:553: undefined reference to `udc_init'
drivers/serial/libserial.a(usbtty.o): In function `usbtty_init_instances':
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/drivers/serial/usbtty.c:683: undefined reference to `udc_setup_ep'
drivers/serial/libserial.a(usbtty.o): In function `drv_usbtty_init':
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/drivers/serial/usbtty.c:560: undefined reference to `udc_startup_events'
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/drivers/serial/usbtty.c:561: undefined reference to `udc_connect'
drivers/serial/libserial.a(usbtty.o): In function `usbtty_tstc':
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/drivers/serial/usbtty.c:399: undefined reference to `udc_unset_nak'
drivers/serial/libserial.a(usbtty.o): In function `usbtty_getc':
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/drivers/serial/usbtty.c:419: undefined reference to `udc_unset_nak'
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/drivers/serial/usbtty.c:424: undefined reference to `udc_set_nak'
lib_arm/libarm.a(bootm.o): In function `do_bootm_linux':
/home/user/Desktop/Uboot_Screwed/u-boot-omapl1/lib_arm/bootm.c:122: undefined reference to `udc_disconnect'
我知道如何修复它们?
由于
此致
乌萨马