Content originally posted in LPCWare by thillaielayaraja on Mon Jun 25 10:53:56 MST 2012
Dear all,
I'm using the LPC11U14 LPC-Link kit for verifying the ROM_USB_cdc example provided by LPCXpresso. This example uses the dependent project files like LPC11Uxx_DriverLib and CMSISv2p00_LPC11Uxx. When I compiled the example, the dependent files are compiled without any errors but the ROM_USB_cdc throws an error for the following line under the main function.
/* get USB API table pointer */
pUsbApi = (USBD_API_T*)((*(ROM **)(0x1FFF1FF8))->pUSBD);
ERROR:
../src/main.c:383:50: error: 'ROM' has no member named 'pUSBD'
REASON:
The following is the structure of ROM
typedefstruct _ROM {
#ifdef USBROMD_PRESENT
const USB * pUSBD;
#else
const unsigned p_usbd;
#endif /* USBROMD_PRESENT */
const unsigned p_clib;
const unsigned p_cand;
#ifdef PWRROMD_PRESENT
const PWRD * pPWRD;
#else
const unsigned p_pwrd;
#endif /* PWRROMD_PRESENT */
const unsigned p_dev1;
const unsigned p_dev2;
const unsigned p_dev3;
const unsigned p_dev4;
} ROM;
i.e., pUSBD pointer is enclosed under the USBROMD_PRESENT preprocessor, which is not defined anywhere in the project files.
When I define it manually, I find that the USB structure is not defined anywhere.
Can someone tell me, how to define USB?
Thanks for the help!