Hello,
I am developing an application using keil's RL-USB library to turn the microcontroller into a USB host controller.
I use the keil's sample: E:\Keilv5\ARM\Boards\Embedded Artists\LPC1788-32 Developers Kit\RL\USB\Host\MSD_File
I have used USB2 as the host. I change the HOST controller in USB_Config.c to USB HOST 1. but i recive this error: .\Obj\MSD_File.axf: Error: L6218E: Undefined symbol usbh1_hcd_ohci (referred from usb_config.o).
That's not where the error is, the error is that there is no actual code to go with the external function definition you reference. ie You make a REFERENCE to something, but it must EXIST somewhere else, for linkage to succeed.
You should go look elsewhere and make sure the function is present in the form required.
. . . #if (USBH1_ENABLE) #if (USBH1_HC_IF == 1) extern USBH_HCD usbh1_hcd_ohci; extern USBH1_HWD_OHCI usbh1_hwd_ohci; <<----Error in this line (usb_lib.c line 61) #define USBH1_HCD &usbh1_hcd_ohci #define USBH1_HWD_OHCI &usbh1_hwd_ohci <<--- In this line #elif (USBH1_HC_IF == 2) . . .
Ok, so you're repeating the same set of facts.
Let me REPEAT, "extern" means it's NOT IN THIS SOURCE FILE, ie external to it. The linker is complaining that the code/structure is NOT IN THE PROJECT.
You need to find where the code/structure should be created. If you have an example that was working, look at which files provided them.
Should it be extern USBH_HWD_OHCI usbh1_hwd_ohci;
Do you have a USBH1_HWD_OHCI or USBH_HWD_OHCI typedef??
USBH_HWD_OHCI define in project
i change USBH1_HWD_OHCI to USBH_HWD_OHCI now keil show this error
linking... .\Obj\MSD_File.axf: Error: L6218E: Undefined symbol usbh1_hcd_ohci (referred from usb_config.o). .\Obj\MSD_File.axf: Error: L6218E: Undefined symbol usbh1_hwd_ohci (referred from usb_config.o). Not enough information to list image symbols. Finished: 1 information, 0 warning and 2 error messages.
this project is keil sample file
So you are doing "programming by trial and error", and then posting all errors you get to this forum?
keil sample have error
what means "programming by trial and error"!!!!!!
You change things in a random attempt to solve the problem rather than understand what the error is telling you.