Reputation: 1201
I have Am-1808, and i need to boot from usb instead of sd-card as explained here. Previously i was using Davinci-PSP-SDK-03.21.00.4, but the uboot of this psp don't have usb support (i confirmed this by typing 'help' in the uboot menu and it didn't have 'usb' command available). So i downloaded u-boot from denx tree which had 'usb 'command in the u-boot menu and then i added the usb configurations in the da850evm.h as suggested by Ti employee. Here's the configuration:
/*
* 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 */
And on compiling i get these errors:
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
If u can please tell how can i get rid of these errors, [I have googled it but didn't find anything useful] or if u can please give me a link of u-boot for Am-1808 which has 'usb' command supported in the u-boot menu.
Update:
I defined CONFIG_USB_TTY in the da850evm.h as auselen pointed, now i am able to resolve previous errors, but i am getting new errors, here's the output of the terminal:
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'
Any idea how can i fix them ?
Thanks
Regards
usama
Upvotes: 2
Views: 2683