linker issue in 3.0 project

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
Legath
Posts: 21
Joined: Thu Oct 17, 2013 3:24 pm

linker issue in 3.0 project

Post 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.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: linker issue in 3.0 project

Post by Giovanni »

The ST driver and the ICU driver are setup to use the same timer.

See your mcuconf.h.

Giovanni
Legath
Posts: 21
Joined: Thu Oct 17, 2013 3:24 pm

Re: linker issue in 3.0 project

Post by Legath »

Hi Giovanni,
as i know, earlier chibios used system timer for operation, now is deprecated?
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: linker issue in 3.0 project

Post 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
User avatar
kulve
Posts: 86
Joined: Mon Nov 28, 2011 8:36 pm

Re: linker issue in 3.0 project

Post 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?
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: linker issue in 3.0 project

Post 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
User avatar
kulve
Posts: 86
Joined: Mon Nov 28, 2011 8:36 pm

Re: linker issue in 3.0 project

Post 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!
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: linker issue in 3.0 project

Post by Giovanni »

Timer 5 is fine if present.

Giovanni
User avatar
kulve
Posts: 86
Joined: Mon Nov 28, 2011 8:36 pm

Re: linker issue in 3.0 project

Post by kulve »

I'm using STM32F4 and now everything seems to be working nicely with ST set to timer5.
Post Reply