undefined reference to `nrfx_twim_init'

Good morning:

I'm trying to develop the twi_scanner with the nrfx libraries. Everything seems to compile fine, but at the end of the Build process I get:

d:/ncs/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(main.c.obj): in function `main':
D:\nrfsrc\twi\scanner_nrfx\src\main.c:119: undefined reference to `nrfx_twim_init'
d:/ncs/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: D:\nrfsrc\twi\scanner_nrfx\src\main.c:120: undefined reference to `nrfx_twim_enable'
d:/ncs/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: D:\nrfsrc\twi\scanner_nrfx\src\main.c:130: undefined reference to `nrfx_twim_is_busy'
d:/ncs/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: D:\nrfsrc\twi\scanner_nrfx\src\main.c:139: undefined reference to `nrfx_twim_xfer'

So, it seems that I have included fine #include <nrfx_twim.h> but haven't configured the project proprerly to find the libraries (although I think I have checked all the references to nrfx amd TWIM in Kconfig).

Just in case you need it, my CMakeLists.txt file:

#
# Copyright (c) 2018 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(NONE)

# NORDIC SDK APP START
target_sources(app PRIVATE
  src/main.c
  src/buttons_and_leds.c
)

# NORDIC SDK APP END

zephyr_library_include_directories(.)

Could anyone help me? Thank you,

David.  

Parents Reply Children
No Data
Related