Page 1 of 1

linker issue in 3.0 project

Posted: Wed Jul 09, 2014 1:12 pm
by Legath
Hi
i am not found same issue on forum , so please help
i have the next error at link stage

Code: Select all

build/obj/st_lld.o (symbol from plugin): In function `st_lld_init':
(.text+0x0): multiple definition of `VectorB0'
build/obj/icu_lld.o (symbol from plugin):(.text+0x0): first defined here


i try to find definition but i found only one

Code: Select all

 grep -rns "VectorB0" *
chibios/os/hal/ports/STM32/STM32F4xx/stm32_isr.h:100:#define STM32_TIM2_HANDLER          VectorB0
chibios/os/common/ports/ARMCMx/compilers/GCC/vectors.c:141:void VectorB0(void) __attribute__((weak, alias("_unhandled_exception")));
chibios/os/common/ports/ARMCMx/compilers/GCC/vectors.c:492:    VectorB0,           VectorB4,           VectorB8,           VectorBC,

others not actual for my case (other compilers , etc...)
please tell me what's wrong.

Re: linker issue in 3.0 project

Posted: Wed Jul 09, 2014 4:30 pm
by Giovanni
The ST driver and the ICU driver are setup to use the same timer.

See your mcuconf.h.

Giovanni

Re: linker issue in 3.0 project

Posted: Thu Jul 10, 2014 3:12 pm
by Legath
Hi Giovanni,
as i know, earlier chibios used system timer for operation, now is deprecated?

Re: linker issue in 3.0 project

Posted: Thu Jul 10, 2014 4:10 pm
by Giovanni
System timer cannot be used if you enable the tickless mode, that requires a more complex counter/timer.

If you disable the tickless mode then systick is used again.

Giovanni

Re: linker issue in 3.0 project

Posted: Sun Mar 08, 2015 3:25 pm
by kulve
I'm bumping into this same issue now when trying to enable (third) PWM driver on timer 2:

Code: Select all

build/obj/st_lld.o (symbol from plugin): In function `st_lld_init':
(.text+0x0): multiple definition of `VectorB0'
build/obj/pwm_lld.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status


Giovanni wrote:System timer cannot be used if you enable the tickless mode


How do I disable or stop using the system timer?

Re: linker issue in 3.0 project

Posted: Sun Mar 08, 2015 4:21 pm
by Giovanni
Hi,

In chconf.h put the systick frequency to 1000 and "delta" to zero, this disables the tickless mode and reverts the kernel to use the normal systick.

Giovanni

Re: linker issue in 3.0 project

Posted: Sun Mar 08, 2015 4:44 pm
by kulve
I definitely want to use the tickless mode, that's a cool feature.

I got help also from the IRC and it seems that it's possible to change the ST to another timer. I'm currently running with ST on timer 5. Not yet sure if my PWM works too.

Thanks!

Re: linker issue in 3.0 project

Posted: Sun Mar 08, 2015 4:47 pm
by Giovanni
Timer 5 is fine if present.

Giovanni

Re: linker issue in 3.0 project

Posted: Sun Mar 08, 2015 4:57 pm
by kulve
I'm using STM32F4 and now everything seems to be working nicely with ST set to timer5.