Building a Connect SDK v1.9 project

Hello,

I am working on a project which was previously developed by another person, and am struggling to setup the development environment. The project was built on nRF Connect SDK v1.9, and I need to be able to recompile the firmware as-is due to time constraints preventing a migration to v3 at the moment.

After getting past some initial hurdles, I'm currently stuck with a device tree error.

Here is the build output:

west build -b nrf9160dk/nrf9160/ns -d c:\wm2build --  -DOVERLAY_CONFIG="config/overlay-debug.conf" -DCONFIG_MCUBOOT_IMAGE_VERSION=\"0.3.0+1\" -DPM_STATIC_YML_FILE=pm_static_debug.yml
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base (cached)).
-- Application: C:/wm2
-- CMake version: 4.1.0
-- Cache files will be written to: C:/wm2/zephyr/.cache
-- Zephyr version: 4.2.99 (C:/wm2/zephyr)
-- Found west (found suitable version "1.4.0", minimum required is "0.14.0")
-- Board: nrf9160dk, Revision: 0.14.0, qualifiers: nrf9160/ns
-- Found host-tools: zephyr 0.17.0 (C:/zephyr-sdk-0.17.0)
-- Found toolchain: zephyr 0.17.0 (C:/zephyr-sdk-0.17.0)
-- Found BOARD.dts: C:/wm2/zephyr/boards/nordic/nrf9160dk/nrf9160dk_nrf9160_ns.dts
-- Found devicetree overlay: C:/wm2/zephyr/boards/nordic/nrf9160dk/nrf9160dk_nrf9160_ns_0_14_0.overlay
-- Found devicetree overlay: C:/wm2/boards/nrf9160dk_nrf9160_ns.overlay
devicetree error: 'sda-pin' appears in /soc/peripheral@40000000/i2c@a000 in C:/wm2build/zephyr/zephyr.dts.pre, but is not declared in 'properties:' in C:/wm2/zephyr/dts/bindings\i2c\nordic,nrf-twim.yaml
CMake Error at zephyr/cmake/modules/dts.cmake:306 (execute_process):
  execute_process failed command indexes:

    1: "Child return code: 1"

Call Stack (most recent call first):
  zephyr/cmake/modules/zephyr_default.cmake:131 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate)
  CMakeLists.txt:17 (find_package)


-- Configuring incomplete, errors occurred!

The error mentions "C:/wm2build/zephyr/zephyr.dts.pre" and "C:/wm2/zephyr/dts/bindings\i2c\nordic,nrf-twim.yaml", but should I even be going in and touching those Zephyr files to begin with? I'm not sure what the proper solution would be for this.

The overall process has been like so:
-git clone ...
-cd ...
-west init
-west update
-run west build

Has anyone seen a similar issue to this, and be able to advise on how I should proceed?

Thank you

Parents Reply Children
  • Thanks for pointing me in the right direction, it does appear to be related to the project overlay(s).

    Here are relevant snippets from the overlay which appear to be triggering the errors.


    devicetree error: 'sda-pin' appears in /soc/peripheral@40000000/i2c@a000 in C:/wm2build/zephyr/zephyr.dts.pre, but is not declared in 'properties:' in C:/wm2/zephyr/dts/bindings\i2c\nordic,nrf-twim.yaml

    &i2c2 {
    	compatible = "nordic,nrf-twim";
    	#address-cells = < 0x1 >;
    	#size-cells = < 0x0 >;
    	reg = < 0xa000 0x1000 >;
    	clock-frequency = < 0x61a80 >;
    	interrupts = < 0xa 0x1 >;
    	status = "okay";
    	label = "I2C_2";
    	sda-pin = < 0x1e >;
    	scl-pin = < 0x1f >;
    
    	lis3mdl: lis3mdl@1e {
    		compatible = "st,lis3mdl";
    		reg = <0x1e>;
    		label = "LIS3MDL";
            irq-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
    	};
    };


    devicetree error: 'ch0-pin' appears in /soc/peripheral@40000000/pwm@21000 in C:/wm2build/zephyr/zephyr.dts.pre, but is not declared in 'properties:' in C:/wm2/zephyr/dts/bindings\pwm\nordic,nrf-pwm.yaml

    &pwm0 {
    	status = "okay";
    	ch0-pin = <2>;
    	ch1-pin = <3>;
    };


    devicetree error: missing data after phandle in <Property 'pwms' on /pwmleds0/pwm_led_0 in C:/wm2/boards/nrf9160dk_nrf9160_ns.overlay:58>

    pwmleds0 {
    		compatible = "pwm-leds";
    		pwm_led0: pwm_led_0 {
    			pwms = <&pwm0 2>;
    		};
    	};
    
    	pwmleds1 {
    		compatible = "pwm-leds";
    		pwm_led1: pwm_led_1 {
    			pwms = <&pwm0 3>;
    		};
    	};


    I can remove those blocks from the overlay to get around the above errors. My assumption was that the project would be in a buildable state given the correct SDKs are setup. Could it be that the overlay was meant for a different version of nRF Connect SDK and/or Zephyr? 

Related