2

我有Am-1808,我需要从 usb 而不是 sd 卡启动,如此处所述。以前我使用的是 Davinci-PSP-SDK-03.21.00.4,但是这个 psp 的 uboot 没有 USB 支持(我通过在 uboot 菜单中输入 'help' 确认了这一点,它没有 'usb' 命令可用)。所以我从 denx 树下载了 u-boot,它在 u-boot 菜单中有“usb”命令,然后按照Ti 员工的建议在 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

如果你能告诉我如何摆脱这些错误,[我已经用谷歌搜索了它,但没有发现任何有用的东西],或者如果你可以请给我一个带有“usb”命令的 Am-1808 的 u-boot 链接在 u-boot 菜单中支持。

更新:

我在 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'

知道如何修复它们吗?

谢谢

问候

乌萨马

4

1 回答 1

1

看起来您需要定义/启用CONFIG_USB_TTY.

于 2012-11-08T12:10:21.850 回答