STM32F103 (Maple) USB and CAN together?
Posted: Mon Mar 24, 2014 11:24 pm
Hi,
I working to get both USB and CAN working together on a STM32F103 (Leaflabs Maple).
I have the USB Shell example (ChibiOS_2.6.3\testhal\STM32F1xx\USB_CDC) working nicely,
and I would like to start adding the CAN interface to that example.
However, if I enable both CAN and USB I get the following compile errors :
$ make all
Compiling main.c
Linking build/MoxiUSB.elf
build/obj/usb_lld.o: In function `usb_pm_alloc':
C:\ChibiStudio\workspace\MoxiUSB/../../chibios/os/hal/platforms/STM32/USBv1/usb_lld.c:276: multiple definition of `Vector8C'
build/obj/can_lld.o:C:\ChibiStudio\workspace\MoxiUSB/../../chibios/os/hal/platforms/STM32/can_lld.c:248: first defined here
build/obj/usb_lld.o: In function `Vector90':
C:\ChibiStudio\workspace\MoxiUSB/../../chibios/os/hal/platforms/STM32/USBv1/usb_lld.c:291: multiple definition of `Vector90'
build/obj/can_lld.o:C:\ChibiStudio\workspace\MoxiUSB/../../chibios/os/hal/platforms/STM32/can_lld.c:262: first defined here
collect2.exe: error: ld returned 1 exit status
../../chibios/os/ports/GCC/ARMCMx/rules.mk:181: recipe for target `build/MoxiUSB.elf' failed
make: *** [build/MoxiUSB.elf] Error 1
I imagine that I need to tell the HAL to move the CAN to the alternate pins in the configuration files -
Could someone please point me to an example for that?
I'm sure it's likely something simple that I'm missing...
thanks,
Tom
I working to get both USB and CAN working together on a STM32F103 (Leaflabs Maple).
I have the USB Shell example (ChibiOS_2.6.3\testhal\STM32F1xx\USB_CDC) working nicely,
and I would like to start adding the CAN interface to that example.
However, if I enable both CAN and USB I get the following compile errors :
$ make all
Compiling main.c
Linking build/MoxiUSB.elf
build/obj/usb_lld.o: In function `usb_pm_alloc':
C:\ChibiStudio\workspace\MoxiUSB/../../chibios/os/hal/platforms/STM32/USBv1/usb_lld.c:276: multiple definition of `Vector8C'
build/obj/can_lld.o:C:\ChibiStudio\workspace\MoxiUSB/../../chibios/os/hal/platforms/STM32/can_lld.c:248: first defined here
build/obj/usb_lld.o: In function `Vector90':
C:\ChibiStudio\workspace\MoxiUSB/../../chibios/os/hal/platforms/STM32/USBv1/usb_lld.c:291: multiple definition of `Vector90'
build/obj/can_lld.o:C:\ChibiStudio\workspace\MoxiUSB/../../chibios/os/hal/platforms/STM32/can_lld.c:262: first defined here
collect2.exe: error: ld returned 1 exit status
../../chibios/os/ports/GCC/ARMCMx/rules.mk:181: recipe for target `build/MoxiUSB.elf' failed
make: *** [build/MoxiUSB.elf] Error 1
I imagine that I need to tell the HAL to move the CAN to the alternate pins in the configuration files -
Could someone please point me to an example for that?
I'm sure it's likely something simple that I'm missing...
thanks,
Tom