Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

BUILD FAILED DUE TO MULTIPLE DEFINITIONS OF SYS_CLOCK_DISABLE

MY BUILD HAS THE FOLLOWING ERROR LOGS PRINTED IN THE CONSOLE

Executing task: nRF Connect: Build [pristine]: fund_less2_exer1/build (active)

Building fund_less2_exer1
west build --build-dir /home/antony/ncs/ncs-fund/v2.x.x/lesson2/fund_less2_exer1/build /home/antony/ncs/ncs-fund/v2.x.x/lesson2/fund_less2_exer1 --pristine --board nrf52dk_nrf52832 --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DCACHED_CONF_FILE=/home/antony/ncs/ncs-fund/v2.x.x/lesson2/fund_less2_exer1/prj.conf

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/antony/ncs/ncs-fund/v2.x.x/lesson2/fund_less2_exer1
-- CMake version: 3.20.5
-- Found Python3: /home/antony/ncs/toolchains/7795df4459/usr/local/bin/python3.8 (found suitable version "3.8.2", minimum required is "3.8") found components: Interpreter
-- Cache files will be written to: /home/antony/.cache/zephyr
-- Zephyr version: 3.4.99 (/home/antony/ncs/v2.5.2/zephyr)
-- Found west (found suitable version "1.1.0", minimum required is "0.14.0")
-- Board: nrf52dk_nrf52832
-- Found host-tools: zephyr 0.16.1 (/home/antony/ncs/toolchains/7795df4459/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.1 (/home/antony/ncs/toolchains/7795df4459/opt/zephyr-sdk)
-- Found Dtc: /home/antony/ncs/toolchains/7795df4459/usr/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found BOARD.dts: /home/antony/ncs/v2.5.2/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts
-- Generated zephyr.dts: /home/antony/ncs/ncs-fund/v2.x.x/lesson2/fund_less2_exer1/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/antony/ncs/ncs-fund/v2.x.x/lesson2/fund_less2_exer1/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /home/antony/ncs/ncs-fund/v2.x.x/lesson2/fund_less2_exer1/build/zephyr/dts.cmake
Parsing /home/antony/ncs/v2.5.2/zephyr/Kconfig
Loaded configuration '/home/antony/ncs/v2.5.2/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832_defconfig'
Merged configuration '/home/antony/ncs/ncs-fund/v2.x.x/lesson2/fund_less2_exer1/prj.conf'
Configuration saved to '/home/antony/ncs/ncs-fund/v2.x.x/lesson2/fund_less2_exer1/build/zephyr/.config'
Kconfig header saved to '/home/antony/ncs/ncs-fund/v2.x.x/lesson2/fund_less2_exer1/build/zephyr/include/generated/autoconf.h'
-- Found GnuLd: /home/antony/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/antony/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /home/antony/ncs/ncs-fund/v2.x.x/lesson2/fund_less2_exer1/build
-- west build: building application
[1/144] Preparing syscall dependency handling

[4/144] Generating include/generated/version.h
-- Zephyr version: 3.4.99 (/home/antony/ncs/v2.5.2/zephyr), build: 4b5ef270413a
[139/144] Linking C executable zephyr/zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map
: && ccache /home/antony/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc  -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf  -fuse-ld=bfd  -T  zephyr/linker_zephyr_pre0.cmd  -Wl,-Map=/home/antony/ncs/ncs-fund/v2.x.x/lesson2/fund_less2_exer1/build/zephyr/zephyr_pre0.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a  zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a  zephyr/lib/libc/picolibc/liblib__libc__picolibc.a  zephyr/lib/libc/common/liblib__libc__common.a  zephyr/soc/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a  zephyr/soc/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/console/libdrivers__console.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/pinctrl/libdrivers__pinctrl.a  zephyr/drivers/serial/libdrivers__serial.a  zephyr/drivers/timer/libdrivers__timer.a  modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a  modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  modules/segger/libmodules__segger.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  -L"/home/antony/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v7e-m/nofp"  -L/home/antony/ncs/ncs-fund/v2.x.x/lesson2/fund_less2_exer1/build/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  -mcpu=cortex-m4  -mthumb  -mabi=aapcs  -mfp16-format=ieee  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn  -Wl,-no-pie  -DPICOLIBC_INTEGER_PRINTF_SCANF  --specs=picolibc.specs  -lc  -lgcc && cd /home/antony/ncs/ncs-fund/v2.x.x/lesson2/fund_less2_exer1/build/zephyr && /home/antony/ncs/toolchains/7795df4459/usr/local/bin/cmake -E true
/home/antony/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/drivers/timer/libdrivers__timer.a(nrf_rtc_timer.c.obj): in function `sys_clock_set_timeout':
/home/antony/ncs/v2.5.2/zephyr/drivers/timer/nrf_rtc_timer.c:641: multiple definition of `sys_clock_set_timeout'; zephyr/drivers/timer/libdrivers__timer.a(cortex_m_systick.c.obj):/home/antony/ncs/v2.5.2/zephyr/drivers/timer/cortex_m_systick.c:170: first defined here
/home/antony/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/drivers/timer/libdrivers__timer.a(nrf_rtc_timer.c.obj): in function `sys_clock_elapsed':
/home/antony/ncs/v2.5.2/zephyr/drivers/timer/nrf_rtc_timer.c:693: multiple definition of `sys_clock_elapsed'; zephyr/drivers/timer/libdrivers__timer.a(cortex_m_systick.c.obj):/home/antony/ncs/v2.5.2/zephyr/drivers/timer/cortex_m_systick.c:251: first defined here
/home/antony/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/drivers/timer/libdrivers__timer.a(nrf_rtc_timer.c.obj): in function `sys_clock_cycle_get_32':
/home/antony/ncs/v2.5.2/zephyr/drivers/timer/nrf_rtc_timer.c:702: multiple definition of `sys_clock_cycle_get_32'; zephyr/drivers/timer/libdrivers__timer.a(cortex_m_systick.c.obj):/home/antony/ncs/v2.5.2/zephyr/drivers/timer/cortex_m_systick.c:265: first defined here
/home/antony/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/drivers/timer/libdrivers__timer.a(nrf_rtc_timer.c.obj): in function `sys_clock_disable':
/home/antony/ncs/v2.5.2/zephyr/drivers/timer/nrf_rtc_timer.c:723: multiple definition of `sys_clock_disable'; zephyr/drivers/timer/libdrivers__timer.a(cortex_m_systick.c.obj):/home/antony/ncs/v2.5.2/zephyr/drivers/timer/cortex_m_systick.c:294: first defined here
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /home/antony/ncs/toolchains/7795df4459/usr/local/bin/cmake --build /home/antony/ncs/ncs-fund/v2.x.x/lesson2/fund_less2_exer1/build

 *  The terminal process terminated with exit code: 1.
 *  Terminal will be reused by tasks, press any key to close it.


I HAVE INCLUDED THE FULL BUILD LOG, I AM BUILDING FOR NRF52832 BOARD.


 
PLEASE HELP HOW TO NAVIGATE THROUGH THIS URGENTLY!!!

Parents Reply Children
No Data
Related