cancel
Showing results for 
Search instead for 
Did you mean: 

Library compile error

Posted on February 21, 2018 at 12:47

I've included STM32_USB-FS-Device_Driver in my project. When I compile (in IAR) I get a bunch of errors

Error[Li006]: duplicate definitions for 'Receive_Buffer'; in 'F:\MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_core.o', and 'F:\

MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_init.o'

Error[Li006]: duplicate definitions for 'Send_length'; in 'F:\MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_core.o', and 'F:\

MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_init.o'

Error[Li006]: duplicate definitions for 'Receive_Buffer'; in 'F:\MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_core.o', and 'F:\

MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_int.o'

Error[Li006]: duplicate definitions for 'Send_length'; in 'F:\MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_core.o', and 'F:\

MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_int.o'

Error[Li006]: duplicate definitions for 'Receive_Buffer'; in 'F:\MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_core.o', and 'F:\

MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_mem.o'

Error[Li006]: duplicate definitions for 'Send_length'; in 'F:\MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_core.o', and 'F:\

MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_mem.o'

Error[Li006]: duplicate definitions for 'Receive_Buffer'; in 'F:\MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_core.o', and 'F:\

MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_regs.o'

Error[Li006]: duplicate definitions for 'Send_length'; in 'F:\MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_core.o', and 'F:\

MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_regs.o'

Error[Li006]: duplicate definitions for 'Receive_Buffer'; in 'F:\MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_core.o', and 'F:\

MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_sil.o'

Error[Li006]: duplicate definitions for 'Send_length'; in 'F:\MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_core.o', and 'F:\

MotorControlSolution\MultiAxisMotorControl\AxisManager\Firmware\STM32F303VC\Debug\Obj\usb_sil.o'

Error while running Linker

What is wrong?

10 REPLIES 10
Posted on February 21, 2018 at 14:33

True, but exactly the same applies whether the 'object' is code or data : there must be exactly one definition - no more, no less.

Hence there is no 'perhaps'  about the fact that the symbol (whether it refers to code or data) is being defined in 2 places.

And both of the 2 places are clearly identified.