8 years, 11 months ago.

nrf51822 target link error: duplicate symbols SystemCoreClockUpdate, SystemCoreClock

Hi,

I've imported the blinking project (https://developer.mbed.org/teams/Icarus-Sensors/code/Blinking-Led/) to compile locally

Online the build is ok and got it working on the board

But when I try to compile on my computer the link doesn't work correctly due to duplicate symbols: - SystemCoreClockUpdate - SystemCoreClock

I tried also with armgcc toolchain 5_2-2015q4 and got the same result

Any idea ?

Thanks Franck

/home/franck/01_lap_counter/01_software/tools/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-g++ -mcpu=cortex-m0 -mthumb -c -g -fno-common -fmessage-length=0 -Wall -Wextra -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -MMD -MP -DNDEBUG -Os -DCORTEX_M0 -DTARGET_MCU_NRF51_16K -DTOOLCHAIN_GCC -DTARGET_MCU_NRF51822 -DTARGET_NRF51822_MKIT -DNRF51 -DTARGET_CORTEX_M -DTARGET_NRF51822 -DARM_MATH_CM0 -DMBED_BUILD_TIMESTAMP=1452071988.44 -DMBED=1 -DTOOLCHAIN_GCC_ARM -DTARGET_NORDIC -DTARGET_MCU_NRF51 -DTARGET_MCU_NORDIC_16K -DTARGET_M0 -DTARGET_MCU_NRF51_16K_S130 -std=gnu++98 -fno-rtti -I. -I./mbed -I./mbed/TARGET_NRF51822 -I./mbed/TARGET_NRF51822/TARGET_NORDIC -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822 -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/crc16 -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/scheduler -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0 -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0 -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nrf-sdk -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nrf-sdk/app_common -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nrf-sdk/sd_common -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_7_1_0 -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_7_1_0/s110_nrf51822_7.1.0_API -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_7_1_0/s110_nrf51822_7.1.0_API/include -I./mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT -I./mbed/TARGET_NRF51822/TOOLCHAIN_GCC_ARM -o main.o main.cpp /home/franck/01_lap_counter/01_software/tools/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -Wl,gc-sections specs=nano.specs -Wl,wrap,main -Wl,-Map=Blinking-Led.map,cref -T./mbed/TARGET_NRF51822/TOOLCHAIN_GCC_ARM/NRF51822.ld -L./mbed/TARGET_NRF51822/TOOLCHAIN_GCC_ARM -o Blinking-Led.elf main.o mbed/TARGET_NRF51822/TOOLCHAIN_GCC_ARM/board.o mbed/TARGET_NRF51822/TOOLCHAIN_GCC_ARM/cmsis_nvic.o mbed/TARGET_NRF51822/TOOLCHAIN_GCC_ARM/retarget.o mbed/TARGET_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.o mbed/TARGET_NRF51822/TOOLCHAIN_GCC_ARM/system_nrf51.o mbed/TARGET_NRF51822/TOOLCHAIN_GCC_ARM/system_nrf51822.o -lmbed -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -lmbed -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys mbed/TARGET_NRF51822/TOOLCHAIN_GCC_ARM/system_nrf51822.o: In function `SystemCoreClockUpdate': system_nrf51822.c:(.text.SystemCoreClockUpdate+0x0): multiple definition of `SystemCoreClockUpdate' mbed/TARGET_NRF51822/TOOLCHAIN_GCC_ARM/system_nrf51.o:system_nrf51.c:(.text.SystemCoreClockUpdate+0x0): first defined here mbed/TARGET_NRF51822/TOOLCHAIN_GCC_ARM/system_nrf51822.o: In function `SystemInit': system_nrf51822.c:(.text.SystemInit+0x0): multiple definition of `SystemInit' mbed/TARGET_NRF51822/TOOLCHAIN_GCC_ARM/system_nrf51.o:system_nrf51.c:(.text.SystemInit+0x0): first defined here mbed/TARGET_NRF51822/TOOLCHAIN_GCC_ARM/system_nrf51822.o:(.data.SystemCoreClock+0x0): multiple definition of `SystemCoreClock' mbed/TARGET_NRF51822/TOOLCHAIN_GCC_ARM/system_nrf51.o:(.data.SystemCoreClock+0x0): first defined here collect2: error: ld returned 1 exit status make: * [Blinking-Led.elf] Error 1

Be the first to answer this question.