NRF54L10: I2C configuration error

Hello Team,

I'm using nrf54l15 dk and ncs version 2.9.0 for the development. I am getting an error while configuring I2C. I selected i2c20 from the device tree and assigned P1.00 for SCL and P1.01 for SDA. It generated the following code in the nrf54l15dk_nrf54l10_cpuapp.overlay file

&i2c20 {
	pinctrl-0 = <&i2c20_default>;
	pinctrl-names = "default";

};

&pinctrl {
	i2c20_default: i2c20_default {
		group1 {
			psels = <NRF_PSEL(TWIM_SDA, 1, 1)>, <NRF_PSEL(TWIM_SCL, 1, 0)>;
		};
	};
};

Added the following configuration in the prj.conf file

CONFIG_I2C=y
CONFIG_PINCTRL=y
And wrote the following code to initialize I2C
#define I2C_NODE        DT_NODELABEL(i2c20)
const struct device *const i2c_dev = DEVICE_DT_GET(I2C_NODE);
const uint16_t i2c_addr = 0x68;
const struct i2c_dt_spec *i2c_spec;

i2c_spec = I2C_DT_SPEC_GET(I2C_NODE);
I'm getting the following error
devicetree error: 'pinctrl-0' is marked as required in 'properties:' in C:/ncs/v2.9.0/zephyr/dts/bindings\i2c\nordic,nrf-twim.yaml, but does not appear in <Node /soc/peripheral@50000000/i2c@c6000 in 'C:/ncs/v2.9.0/zephyr/misc/empty_file.c'>
Kindly help me resolve the error.
Regards,
Payal
Parents Reply Children
  • Attached is the file for the complete

     *  Executing task: nRF Connect: Generate config nrf54l15dk/nrf54l10/cpuapp for c:\Payal\Project\Gas_meter\gas_meter_base_fw\Code_1\Code 
    
    Building Code
    C:\Windows\system32\cmd.exe /d /s /c "west build --build-dir c:/Payal/Project/Gas_meter/gas_meter_base_fw/Code_1/Code/build_1 c:/Payal/Project/Gas_meter/gas_meter_base_fw/Code_1/Code --pristine --board nrf54l15dk/nrf54l10/cpuapp -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=c:/payal/project/gas_meter/gas_meter_base_fw/code_1/code"
    
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: C:/ncs/toolchains/b620d30767/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v2.9.0/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf54l15dk, qualifiers: nrf54l10/cpuapp
    Parsing C:/ncs/v2.9.0/zephyr/share/sysbuild/Kconfig
    Loaded configuration 'C:/Payal/Project/Gas_meter/gas_meter_base_fw/Code_1/Code/build_1/_sysbuild/empty.conf'
    Merged configuration 'c:/Payal/Project/Gas_meter/gas_meter_base_fw/Code_1/Code/sysbuild.conf'
    Configuration saved to 'C:/Payal/Project/Gas_meter/gas_meter_base_fw/Code_1/Code/build_1/zephyr/.config'
    Kconfig header saved to 'C:/Payal/Project/Gas_meter/gas_meter_base_fw/Code_1/Code/build_1/_sysbuild/autoconf.h'
    -- 
       *****************************
       * Running CMake for mcuboot *
       *****************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/ncs/v2.9.0/bootloader/mcuboot/boot/zephyr
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/b620d30767/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v2.9.0/zephyr/.cache
    -- Zephyr version: 3.7.99 (C:/ncs/v2.9.0/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf54l15dk, qualifiers: nrf54l10/cpuapp
    -- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/b620d30767/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/b620d30767/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/b620d30767/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: C:/ncs/v2.9.0/zephyr/boards/nordic/nrf54l15dk/nrf54l15dk_nrf54l10_cpuapp.dts
    -- Found devicetree overlay: C:/ncs/v2.9.0/bootloader/mcuboot/boot/zephyr/app.overlay
    devicetree error: 'pinctrl-0' is marked as required in 'properties:' in C:/ncs/v2.9.0/zephyr/dts/bindings\i2c\nordic,nrf-twim.yaml, but does not appear in <Node /soc/peripheral@50000000/i2c@c6000 in 'C:/ncs/v2.9.0/zephyr/misc/empty_file.c'>
    CMake Error at C:/ncs/v2.9.0/zephyr/cmake/modules/dts.cmake:295 (execute_process):
      execute_process failed command indexes:
    
        1: "Child return code: 1"
    
    Call Stack (most recent call first):
      C:/ncs/v2.9.0/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:12 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message):
      CMake configure failed for Zephyr project: mcuboot
    
      Location: C:/ncs/v2.9.0/bootloader/mcuboot/boot/zephyr/
    Call Stack (most recent call first):
      cmake/modules/sysbuild_images.cmake:20 (ExternalZephyrProject_Cmake)
      cmake/modules/sysbuild_default.cmake:20 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      C:/ncs/v2.9.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/Payal/Project/Gas_meter/gas_meter_base_fw/Code_1/Code/build_1/CMakeFiles/CMakeOutput.log".
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\b620d30767\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/b620d30767/opt/bin/python.exe '-Bc:\Payal\Project\Gas_meter\gas_meter_base_fw\Code_1\Code\build_1' -GNinja -DBOARD=nrf54l15dk/nrf54l10/cpuapp -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=c:/payal/project/gas_meter/gas_meter_base_fw/code_1/code '-SC:\ncs\v2.9.0\zephyr\share\sysbuild' '-DAPP_DIR:PATH=c:\Payal\Project\Gas_meter\gas_meter_base_fw\Code_1\Code'
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it. 
    
    error log

  • Hi,

     

    It looks like you have altered the mcuboot app.overlay file:

    ....
    -- Found devicetree overlay: C:/ncs/v2.9.0/bootloader/mcuboot/boot/zephyr/app.overlay
    devicetree error: 'pinctrl-0' is marked as required in 'properties:' in C:/ncs/v2.9.0/zephyr/dts/bindings\i2c\nordic,nrf-twim.yaml, but does not appear in <Node /soc/peripheral@50000000/i2c@c6000 in 'C:/ncs/v2.9.0/zephyr/misc/empty_file.c'>
    CMake Error at C:/ncs/v2.9.0/zephyr/cmake/modules/dts.cmake:295 (execute_process):
      execute_process failed command indexes:
      
    ....
    I would recommend that you revert the changes done in this file:

    Go to folder "C:/ncs/v2.9.0/bootloader/mcuboot/boot/zephyr/" and open a cmd line in this path, then write:

    git checkout app.overlay

     

    Kind regards,

    Håkon

  • Hi,

    Go to folder "C:/ncs/v2.9.0/bootloader/mcuboot/boot/zephyr/" and open a cmd line in this path, then write:

    git checkout app.overlay

    I tried this, but I still get the same error while compiling for nrf54l10.

  • Hi,

     

    That is strange.

    Q1: Is the issue due to path length on your end?

    Try using a shorter path, for instance c:\sdk\my_app

    Q2: are you using a custom board, since you always add mcuboot even for blinky?

     

    Kind regards,

    Håkon

  • Try using a shorter path, for instance c:\sdk\my_app

    Tried. Not working.

    Q2: are you using a custom board, since you always add mcuboot even for blinky?

    No.

Related