Content originally posted in LPCWare by sipiyou on Mon Mar 09 06:14:12 MST 2015
Hi Mc,
short update.
I downloaded the archive from above link and tried to compile LPCUSBLib. Except for 1 problem (__BSS is not defined properly - added this for GCC) compilation works BUT these functions are missing inside the LPCUSBlib which is distributed along the keil devkit:
cdc_main.o:(.rodata.g_usbApi+0x0): undefined reference to `hw_api'
cdc_main.o:(.rodata.g_usbApi+0x4): undefined reference to `core_api'
cdc_main.o:(.rodata.g_usbApi+0x14): undefined reference to `cdc_api'
Then I did a grep on the complete archive but these functions are not inside this archive as well... this is the usb_rom_api stuff which is not bundeled.
Nevertheless, I am still wondering why my code does not run if I use the static library libusbd_177x_8x_lib.a for compiling.
Attached my complete project. All you need to do is to uncompress it into 1 directory. There are 2 makefiles:
make -f Makefile1 tries to compile using the LPCUSBLib which I found in the keil archive you suggested me (which is incomplete)
make -f Makefile2 does complile using the precompiled libusbd_177x_8x_lib.a which is part of lpcopen v2.10 lpcxpresso archive - nevertheless, the usb subsystem does not work as described above - uart works.
As I do not have EMC on my board, all EMC init has been removed out of the code.
cdc_main.c is the main file used for this project