2018-02-21 03:47 AM
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 LinkerWhat is wrong?
2018-02-21 06:33 AM
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.