pazi88 / STM32_CAN

CAN bus Library for Arduino STM32
GNU General Public License v3.0
67 stars 28 forks source link

error compiling #26

Closed stproj18 closed 5 months ago

stproj18 commented 6 months ago

Im tryng to compile for STM32 (blue pill) but this strange erro occur....

Any Idea what happing?

e:/arduino-1.8.19/portable/packages/stmicroelectronics/tools/xpack-arm-none-eabi-gcc/12.2.1-1.2/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\flavi\AppData\Local\Temp\arduino_cache_316922\core\core_d6cef7252aaa572c376d43cad9dcca4d.a(usbd_conf.c.o): in function USB_LP_CAN1_RX0_IRQHandler': usbd_conf.c:(.text.USB_LP_CAN1_RX0_IRQHandler+0x0): multiple definition ofUSB_LP_CAN1_RX0_IRQHandler'; C:\Users\flavi\AppData\Local\Temp\arduino_build_532618\libraries\STM32_CAN\STM32_CAN.cpp.o:STM32_CAN.cpp:(.text.USB_LP_CAN1_RX0_IRQHandler+0x0): first defined here e:/arduino-1.8.19/portable/packages/stmicroelectronics/tools/xpack-arm-none-eabi-gcc/12.2.1-1.2/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\flavi\AppData\Local\Temp\arduino_cache_316922\core\core_d6cef7252aaa572c376d43cad9dcca4d.a(usbd_conf.c.o): in function USB_HP_CAN1_TX_IRQHandler': usbd_conf.c:(.text.USB_HP_CAN1_TX_IRQHandler+0x0): multiple definition ofUSB_HP_CAN1_TX_IRQHandler'; C:\Users\flavi\AppData\Local\Temp\arduino_build_532618\libraries\STM32_CAN\STM32_CAN.cpp.o:STM32_CAN.cpp:(.text.USB_HP_CAN1_TX_IRQHandler+0x0): first defined here collect2.exe: error: ld returned 1 exit status

pazi88 commented 5 months ago

I think you are trying to compile with USB enabled. USB and CAN can't be used simultaneously on bluepill, because those use same resources on F103

stproj18 commented 5 months ago

I think you are trying to compile with USB enabled. USB and CAN can't be used simultaneously on bluepill, because those use same resources on F103

Thank you for the answer!