I am working on a project where I emulate a USB device using the Photon. The project was completed on the Core and now I am trying to port it to the Photon; However, I have spent a few days trying to figure out how everything is built/linked together and cannot seem to get my changes to work. On the Core, I modified the usb firmware directly but this time I would like to (if possible) have the changes in the application folder by including the USB firmware.
Whenever I include USB files (I’ve tried usbd_core.h, usb_hal.h, and usbd_usr.h) everything compiles fine but whenever I try to actually call functions (USBD_Init(), SPARK_USB_Setup(), or USBD_USR_Init()) I get:
application.cpp:34: undefined reference to <function>
Where “function” is any of the above initialization functions I try. The appropriate libraries are being linked in the GCC build string, so there is something with the way the build is setup that I do not understand.
Any information that could shed light on this situation would be helpful.
Edit: For more clarity, my changes to the Core were done before the Photon was released, so it was using the solitary Core firmware.