• AVR Freaks

Helpful ReplyHot!Harmony 3 USB projects will not compile if xc32-gcc optimization is set to 0? Why??

Author
cbeif
Starting Member
  • Total Posts : 56
  • Reward points : 0
  • Joined: 2012/05/09 14:28:30
  • Location: 0
  • Status: offline
2019/07/08 11:53:51 (permalink)
0

Harmony 3 USB projects will not compile if xc32-gcc optimization is set to 0? Why??

If I set optimization level to 1, everything compiles.
 
If I set optimization level to 0, I get these error messages.
This makes debugging other stuff very difficult. since so many local variables are optimized away.
 
================================================
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs.o: In function `DRV_USBHS_Tasks':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs.c:219: undefined reference to `PLIB_USBHS_GlobalInterruptEnable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs.c:222: undefined reference to `PLIB_USBHS_SoftResetEnable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs.c:262: undefined reference to `PLIB_USBHS_USBIDOverrideEnable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs.c:262: undefined reference to `PLIB_USBHS_PhyIDMonitoringEnable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs.c:262: undefined reference to `PLIB_USBHS_USBIDOverrideValueSet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs.c:272: undefined reference to `PLIB_USBHS_USBIDOverrideEnable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs.c:272: undefined reference to `PLIB_USBHS_PhyIDMonitoringEnable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs.c:272: undefined reference to `PLIB_USBHS_USBIDOverrideValueSet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs.c:314: undefined reference to `PLIB_USBHS_VBUSLevelGet'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `_DRV_USBHS_ProcessIRPFIFO':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:379: undefined reference to `PLIB_USBHS_DeviceEPFIFOLoad'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:396: undefined reference to `PLIB_USBHS_DeviceEPFIFOLoad'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:409: undefined reference to `PLIB_USBHS_DMAOperationEnable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:415: undefined reference to `PLIB_USBHS_DeviceEPFIFOLoad'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:434: undefined reference to `PLIB_USBHS_DeviceEPFIFOUnload'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:446: undefined reference to `PLIB_USBHS_GetReceiveDataCount'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:452: undefined reference to `PLIB_USBHS_DMAOperationEnable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:458: undefined reference to `PLIB_USBHS_DeviceEPFIFOUnload'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:466: undefined reference to `PLIB_USBHS_DeviceEPFIFOUnload'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `_DRV_USBHS_DEVICE_Initialize':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:493: undefined reference to `PLIB_USBHS_InterruptEnableSet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:498: undefined reference to `PLIB_USBHS_InterruptEnableSet'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `DRV_USBHS_DEVICE_AddressSet':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:540: undefined reference to `PLIB_USBHS_DeviceAddressSet'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `DRV_USBHS_DEVICE_Attach':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:716: undefined reference to `PLIB_USBHS_USBIDOverrideEnable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:716: undefined reference to `PLIB_USBHS_PhyIDMonitoringEnable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:716: undefined reference to `PLIB_USBHS_USBIDOverrideValueSet'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `_DRV_USBHS_DEVICE_AttachStateMachine':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:763: undefined reference to `PLIB_USBHS_InterruptEnableSet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:769: undefined reference to `PLIB_USBHS_DeviceAttach'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `DRV_USBHS_DEVICE_Detach':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:832: undefined reference to `PLIB_USBHS_DeviceDetach'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:843: undefined reference to `PLIB_USBHS_InterruptEnableSet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:846: undefined reference to `PLIB_USBHS_TxInterruptDisable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:847: undefined reference to `PLIB_USBHS_RxInterruptDisable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:852: undefined reference to `PLIB_USBHS_TxEPStatusClear'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:853: undefined reference to `PLIB_USBHS_EndpointTxFIFOFlush'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:855: undefined reference to `PLIB_USBHS_EndpointRxFIFOFlush'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:856: undefined reference to `PLIB_USBHS_RxEPStatusClear'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:861: undefined reference to `PLIB_USBHS_DMAInterruptGet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:873: undefined reference to `PLIB_USBHS_DMAErrorGet'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `DRV_USBHS_DEVICE_EndpointEnable':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1062: undefined reference to `PLIB_USBHS_TxInterruptEnable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1143: undefined reference to `PLIB_USBHS_DeviceTxEndpointConfigure'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1148: undefined reference to `PLIB_USBHS_DeviceRxEndpointConfigure'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `DRV_USBHS_DEVICE_EndpointDisable':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1303: undefined reference to `PLIB_USBHS_TxInterruptDisable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1304: undefined reference to `PLIB_USBHS_RxInterruptDisable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1348: undefined reference to `PLIB_USBHS_TxInterruptDisable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1353: undefined reference to `PLIB_USBHS_RxInterruptDisable'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `DRV_USBHS_DEVICE_IRPSubmit':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1776: undefined reference to `PLIB_USBHS_EP0TxPktRdyDataEnd'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1782: undefined reference to `PLIB_USBHS_EP0TxPktRdy'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1793: undefined reference to `PLIB_USBHS_EP0RxPktRdyServicedDataEnd'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1802: undefined reference to `PLIB_USBHS_EP0StatusGet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1845: undefined reference to `PLIB_USBHS_EP0RxPktRdyServicedDataEnd'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1857: undefined reference to `PLIB_USBHS_EP0RxPktRdyServiced'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1873: undefined reference to `PLIB_USBHS_EP0DataEndSet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1894: undefined reference to `PLIB_USBHS_DeviceTxEndpointPacketReady'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1905: undefined reference to `PLIB_USBHS_RxEPStatusGet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:1916: undefined reference to `PLIB_USBHS_RxEPStatusClear'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `DRV_USBHS_DEVICE_IRPCancelAll':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2147: undefined reference to `PLIB_USBHS_EndpointTxFIFOFlush'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `DRV_USBHS_DEVICE_EndpointStall':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2439: undefined reference to `PLIB_USBHS_EP0StallEnable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2454: undefined reference to `PLIB_USBHS_DeviceTxEndpointStallEnable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2459: undefined reference to `PLIB_USBHS_DeviceRxEndpointStallEnable'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `DRV_USBHS_DEVICE_EndpointStallClear':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2603: undefined reference to `PLIB_USBHS_DeviceTxEndpointStallDisable'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2610: undefined reference to `PLIB_USBHS_DeviceRxEndpointStallDisable'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `_DRV_USBHS_DEVICE_Tasks_ISR':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2721: undefined reference to `PLIB_USBHS_GenInterruptFlagsGet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2746: undefined reference to `PLIB_USBHS_HighSpeedIsConnected'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2788: undefined reference to `PLIB_USBHS_TxInterruptFlagsGet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2789: undefined reference to `PLIB_USBHS_RxInterruptFlagsGet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2799: undefined reference to `PLIB_USBHS_LoadEPInIndex'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2800: undefined reference to `PLIB_USBHS_EP0StatusGet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2807: undefined reference to `PLIB_USBHS_EP0SentStallClear'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2819: undefined reference to `PLIB_USBHS_EP0SetupEndServiced'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2875: undefined reference to `PLIB_USBHS_GetEP0FIFOAddress'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2876: undefined reference to `PLIB_USBHS_GetEP0FIFOAddress'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2917: undefined reference to `PLIB_USBHS_GetEP0CSRAddress'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2935: undefined reference to `PLIB_USBHS_GetEP0CSRAddress'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2948: undefined reference to `PLIB_USBHS_GetEP0CSRAddress'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2967: undefined reference to `PLIB_USBHS_GetEP0CSRAddress'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2989: undefined reference to `PLIB_USBHS_GetEP0CSRAddress'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o:c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:2996: more undefined references to `PLIB_USBHS_GetEP0CSRAddress' follow
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `_DRV_USBHS_DEVICE_Tasks_ISR':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3160: undefined reference to `PLIB_USBHS_EP0TxPktRdy'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3210: undefined reference to `PLIB_USBHS_GetEP0CSRAddress'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3217: undefined reference to `PLIB_USBHS_GetEP0CSRAddress'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3263: undefined reference to `PLIB_USBHS_TxEPStatusGet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3271: undefined reference to `PLIB_USBHS_TxEPStatusClear'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3301: undefined reference to `PLIB_USBHS_TxEPStatusClear'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3302: undefined reference to `PLIB_USBHS_DeviceTxEndpointPacketReady'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3327: undefined reference to `PLIB_USBHS_TxEPStatusClear'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3328: undefined reference to `PLIB_USBHS_DeviceTxEndpointPacketReady'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3344: undefined reference to `PLIB_USBHS_TxEPStatusClear'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3345: undefined reference to `PLIB_USBHS_DeviceTxEndpointPacketReady'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3362: undefined reference to `PLIB_USBHS_RxEPStatusGet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3368: undefined reference to `PLIB_USBHS_RxEPStatusClear'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3387: undefined reference to `PLIB_USBHS_EndpointRxFIFOFlush'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3390: undefined reference to `PLIB_USBHS_RxEPStatusClear'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3411: undefined reference to `PLIB_USBHS_RxEPStatusClear'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `DRV_USBHS_DEVICE_TestModeEnter':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3549: undefined reference to `PLIB_USBHS_DeviceEPFIFOLoad'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3552: undefined reference to `PLIB_USBHS_TestModeEnter'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3562: undefined reference to `PLIB_USBHS_EP0TxPktRdy'
build/ScanningCameraConfig/production/_ext/1356823658/drv_usbhs_device.o: In function `_DRV_USBHS_DEVICE_Tasks_ISR_USBDMA':
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3654: undefined reference to `PLIB_USBHS_DMAInterruptGet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3661: undefined reference to `PLIB_USBHS_DMAErrorGet'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3689: undefined reference to `PLIB_USBHS_TxEPStatusClear'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3690: undefined reference to `PLIB_USBHS_EndpointTxFIFOFlush'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3696: undefined reference to `PLIB_USBHS_TxEPStatusClear'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3697: undefined reference to `PLIB_USBHS_DeviceTxEndpointPacketReady'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3748: undefined reference to `PLIB_USBHS_RxEPStatusClear'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3764: undefined reference to `PLIB_USBHS_RxEPStatusClear'
c:/dev/scanningcamera2/firmware/src/config/scanningcameraconfig/driver/usb/usbhs/src/drv_usbhs_device.c:3777: undefined reference to `PLIB_USBHS_RxEPStatusClear'
collect2.exe: error: ld returned 255 exit status
make[2]: *** [dist/ScanningCameraConfig/production/ScanningCamera.X.production.hex] Error 255
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
nbproject/Makefile-ScanningCameraConfig.mk:719: recipe for target 'dist/ScanningCameraConfig/production/ScanningCamera.X.production.hex' failed
make[2]: Leaving directory 'C:/dev/ScanningCamera2/firmware/ScanningCamera.X'
nbproject/Makefile-ScanningCameraConfig.mk:90: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/dev/ScanningCamera2/firmware/ScanningCamera.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
BUILD FAILED (exit value 2, total time: 9s)
#1
eks
Starting Member
  • Total Posts : 40
  • Reward points : 0
  • Joined: 2008/05/06 21:47:14
  • Location: 0
  • Status: offline
Re: Harmony 3 USB projects will not compile if xc32-gcc optimization is set to 0? Why?? 2019/07/16 01:20:47 (permalink) ☄ Helpfulby cbeif 2019/07/17 08:38:32
0
USB v3.2.2, modify the "plib_usbhs_header.h" file (Line Number: 32 on wards) as shown below should fix the problem. 
 
/* Default definition used for all API dispatch functions */
#ifndef PLIB_INLINE_API
#define PLIB_INLINE_API static inline
#endif
/* Default definition used for all other functions */
#ifndef PLIB_INLINE
#define PLIB_INLINE static inline
#endif
post edited by eks - 2019/07/16 10:21:46
#2
cbeif
Starting Member
  • Total Posts : 56
  • Reward points : 0
  • Joined: 2012/05/09 14:28:30
  • Location: 0
  • Status: offline
Re: Harmony 3 USB projects will not compile if xc32-gcc optimization is set to 0? Why?? 2019/07/17 08:39:05 (permalink)
0
Thanks eks, that worked great!
#3
Jump to:
© 2019 APG vNext Commercial Version 4.5