Hello,
I am working on a custom PCB with NRF9160.
I have modified nrf9160 uart sample to add UART_1 and enable SPI_3 and everything is working fine.
Now I need to include I2C_3 but SES will not open project if I add I2C_3 to 'prj.config' Please see output below:
Loading solution uart.emProject
Executing load commands
cmake -GNinja -DBOARD=nrf9160_pca10090 -DBOARD_DIR=C:/NRF91SDK/ncs/zephyr/boards/arm/nrf9160_pca10090 -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=C:/gnuarmemb/8 2018-q4-major -BC:/NRF91SDK/ncs/nrf/samples/nrf9160/uart/build -HC:/NRF91SDK/ncs/nrf/samples/nrf9160/uart -DDTC_OVERLAY_FILE=C:/NRF91SDK/ncs/nrf/samples/nrf9160/uart/nrf9160_pca10090.overlay
-- Found PythonInterp: C:/Python37/python.exe (found suitable version "3.7.2", minimum required is "3.4")
-- Selected BOARD nrf9160_pca10090
Zephyr version: 1.13.99
Parsing Kconfig tree in C:/nRF91SDK/ncs/zephyr/Kconfig
Loading C:/NRF91SDK/ncs/nrf/samples/nrf9160/uart/build/zephyr/.config as base
-- Loading C:/NRF91SDK/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090.dts as base
-- Overlaying C:/nRF91SDK/ncs/zephyr/dts/common/common.dts
-- Overlaying C:/NRF91SDK/ncs/nrf/samples/nrf9160/uart/nrf9160_pca10090.overlay
nrf9160_pca10090.dts_compiled: Warning (unit_address_format): /soc/adc@0x4000e000: unit name should not have leading "0x"
nrf9160_pca10090.dts_compiled: Warning (unique_unit_address): /soc/uart@40008000: duplicate unit-address (also used in node /soc/i2c@40008000)
nrf9160_pca10090.dts_compiled: Warning (unique_unit_address): /soc/uart@40009000: duplicate unit-address (also used in node /soc/i2c@40009000)
nrf9160_pca10090.dts_compiled: Warning (unique_unit_address): /soc/uart@4000a000: duplicate unit-address (also used in node /soc/i2c@4000a000)
nrf9160_pca10090.dts_compiled: Warning (unique_unit_address): /soc/uart@4000b000: duplicate unit-address (also used in node /soc/i2c@4000b000)
nrf9160_pca10090.dts_compiled: Warning (unique_unit_address): /soc/uart@40008000: duplicate unit-address (also used in node /soc/spi@40008000)
nrf9160_pca10090.dts_compiled: Warning (unique_unit_address): /soc/i2c@40008000: duplicate unit-address (also used in node /soc/spi@40008000)
nrf9160_pca10090.dts_compiled: Warning (unique_unit_address): /soc/uart@40009000: duplicate unit-address (also used in node /soc/spi@40009000)
nrf9160_pca10090.dts_compiled: Warning (unique_unit_address): /soc/i2c@40009000: duplicate unit-address (also used in node /soc/spi@40009000)
nrf9160_pca10090.dts_compiled: Warning (unique_unit_address): /soc/uart@4000a000: duplicate unit-address (also used in node /soc/spi@4000a000)
nrf9160_pca10090.dts_compiled: Warning (unique_unit_address): /soc/i2c@4000a000: duplicate unit-address (also used in node /soc/spi@4000a000)
nrf9160_pca10090.dts_compiled: Warning (unique_unit_address): /soc/uart@4000b000: duplicate unit-address (also used in node /soc/spi@4000b000)
nrf9160_pca10090.dts_compiled: Warning (unique_unit_address): /soc/i2c@4000b000: duplicate unit-address (also used in node /soc/spi@4000b000)
nrf9160_pca10090.dts_compiled: Warning (unique_unit_address): /soc/clock@40005000: duplicate unit-address (also used in node /soc/power@40005000)
-- Cache files will be written to: C:\Users\ibrah\AppData\Local/.cache/zephyr
-- The C compiler identification is GNU 8.2.1
-- The CXX compiler identification is GNU 8.2.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/gnuarmemb/8 2018-q4-major/bin/arm-none-eabi-gcc.exe
-- Performing Test toolchain_is_ok
-- Performing Test toolchain_is_ok - Success
CMake Warning (dev) at C:/NRF91SDK/ncs/zephyr/cmake/extensions.cmake:837 (target_link_libraries):
Policy CMP0079 is not set: target_link_libraries allows use with targets in
other directories. Run "cmake --help-policy CMP0079" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
Target
zephyr_interface
is not created in this directory. For compatibility with older versions of
CMake, link library
-mabi=aapcs
will be looked up in the directory in which the target was created rather
than in this calling directory.
Call Stack (most recent call first):
C:/NRF91SDK/ncs/zephyr/cmake/extensions.cmake:1055 (target_link_libraries_ifdef)
C:/NRF91SDK/ncs/zephyr/cmake/extensions.cmake:115 (target_ld_options)
C:/NRF91SDK/ncs/zephyr/arch/arm/CMakeLists.txt:20 (zephyr_ld_options)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at C:/NRF91SDK/ncs/zephyr/cmake/extensions.cmake:837 (target_link_libraries):
Policy CMP0079 is not set: target_link_libraries allows use with targets in
other directories. Run "cmake --help-policy CMP0079" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
Target
zephyr_interface
is not created in this directory. For compatibility with older versions of
CMake, link library
-march=armv8-m.main+dsp
will be looked up in the directory in which the target was created rather
than in this calling directory.
Call Stack (most recent call first):
C:/NRF91SDK/ncs/zephyr/cmake/extensions.cmake:1055 (target_link_libraries_ifdef)
C:/NRF91SDK/ncs/zephyr/cmake/extensions.cmake:115 (target_ld_options)
C:/NRF91SDK/ncs/zephyr/arch/arm/CMakeLists.txt:20 (zephyr_ld_options)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at C:/NRF91SDK/ncs/zephyr/CMakeLists.txt:678 (message):
The Zephyr library 'drivers__i2c' was created without source files. Empty
(non-imported) libraries are not supported. Either make sure that the
library has the sources it should have, or make sure it is not created when
it has no source files.
-- Configuring incomplete, errors occurred!
See also "C:/NRF91SDK/ncs/nrf/samples/nrf9160/uart/build/CMakeFiles/CMakeOutput.log".
See also "C:/NRF91SDK/ncs/nrf/samples/nrf9160/uart/build/CMakeFiles/CMakeError.log".
Project load failed
Reported error: solution load command failed (1)
my prj.config:
CONFIG_SERIAL=y CONFIG_TRUSTED_EXECUTION_NONSECURE=y CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_UART_1_NRF_UARTE=y # SPI CONFIG_SPI=y CONFIG_SPI_3=y CONFIG_SPI_3_NRF_SPIM=y CONFIG_SPI_3=y CONFIG_SPI_NRFX=y # Enable I2C CONFIG_I2C=y CONFIG_I2C_3=y CONFIG_I2C_3_NRF_TWIM=y CONFIG_I2C_NRFX=y CONFIG_I2C_INIT_PRIORITY=60
I tried using i2c_scanner sample and that worked but uart sample doesn't
Please help
Thank you