Overlay causes build errors

Hei!

I can't seem to get my devicetree overlay to properly work. I have an external LED and two buttons connected to the GPIO ports mentioned in the overlay, and I've tried removing the nodes that causes multiple nodes to wanna use the same pins (for example, I had to move the UART pins).

Below is the build error I get when doing a pristine build, and under that again is the device overlay. Any help is appreciated! :)

Build log:


-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: A:/bachelornordic/main_unit
-- Found Python3: A:/nordicsemi/toolchains/v2.3.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
-- Cache files will be written to: A:/nordicsemi/v2.3.0/zephyr/.cache
-- Zephyr version: 3.2.99 (A:/nordicsemi/v2.3.0/zephyr)
-- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
-- Board: nrf9160dk_nrf9160_ns, Revision: 0.7.0
-- Found host-tools: zephyr 0.15.2 (A:/nordicsemi/toolchains/v2.3.0/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.15.2 (A:/nordicsemi/toolchains/v2.3.0/opt/zephyr-sdk)
-- Found Dtc: A:/nordicsemi/toolchains/v2.3.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
-- Found BOARD.dts: A:/nordicsemi/v2.3.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns.dts
-- Found devicetree overlay: a:/bachelornordic/main_unit/boards/nrf9160dk_nrf9160_ns.overlay
devicetree error: a:/bachelornordic/main_unit/boards/nrf9160dk_nrf9160_ns.overlay:102 (column 3): parse error: expected node name, property name, or '}'
CMake Error at A:/nordicsemi/v2.3.0/zephyr/cmake/modules/dts.cmake:231 (message):
  gen_defines.py failed with return code: 1
Call Stack (most recent call first):
  A:/nordicsemi/v2.3.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)
  A:/nordicsemi/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  A:/nordicsemi/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:5 (find_package)


-- In: A:/bachelornordic/main_unit/build/zephyr, command: A:/nordicsemi/toolchains/v2.3.0/opt/bin/python.exe;A:/nordicsemi/v2.3.0/zephyr/scripts/dts/gen_defines.py;--dts;A:/bachelornordic/main_unit/build/zephyr/zephyr.dts.pre;--dtc-flags;'-Wno-unique_unit_address_if_enabled';--bindings-dirs;A:/nordicsemi/v2.3.0/nrf/dts/bindings;A:/nordicsemi/v2.3.0/zephyr/boards/arm/nrf9160dk_nrf9160/dts/bindings;A:/nordicsemi/v2.3.0/zephyr/dts/bindings;--header-out;A:/bachelornordic/main_unit/build/zephyr/include/generated/devicetree_generated.h.new;--dts-out;A:/bachelornordic/main_unit/build/zephyr/zephyr.dts.new;--edt-pickle-out;A:/bachelornordic/main_unit/build/zephyr/edt.pickle;--vendor-prefixes;A:/nordicsemi/v2.3.0/nrf/dts/bindings/vendor-prefixes.txt;--vendor-prefixes;A:/nordicsemi/v2.3.0/zephyr/dts/bindings/vendor-prefixes.txt
-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'a:\nordicsemi\toolchains\v2.3.0\opt\bin\cmake.EXE' '-DWEST_PYTHON=a:\nordicsemi\toolchains\v2.3.0\opt\bin\python.exe' '-Ba:\bachelornordic\main_unit\build' -GNinja -DBOARD=nrf9160dk_nrf9160_ns -DNCS_TOOLCHAIN_VERSION:STRING=NONE '-DBOARD_ROOT:STRING=a:/bachelornordic/main_unit;a:/bachelortesting/div_tests/bme280_test' -DCONFIG_DEBUG_OPTIMIZATIONS:STRING=y -DCONFIG_DEBUG_THREAD_INFO:STRING=y -DDTC_OVERLAY_FILE:STRING=a:/bachelornordic/main_unit/boards/nrf9160dk_nrf9160_ns.overlay -DCONF_FILE:STRING=a:/bachelornordic/main_unit/prj.conf '-Sa:\bachelornordic\main_unit'

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

nrf9160dk_nrf9160_ns.overlay:

&pinctrl {
	i2c2_default: i2c2_default {
		group1 {
			psels = <NRF_PSEL(TWIM_SDA, 0, 11)>,
					<NRF_PSEL(TWIM_SCL, 0, 12)>;
		};
	};

	i2c2_sleep: i2c2_sleep {
		group1 {
			psels = <NRF_PSEL(TWIM_SDA, 0, 11)>,
					<NRF_PSEL(TWIM_SCL, 0, 12)>;
			low-power-enable;
		};
	};

	spi3_default: spi3_default {
		group1 {
			psels = <NRF_PSEL(SPIM_SCK, 0, 3)>,
					<NRF_PSEL(SPIM_MOSI, 0, 4)>,
					<NRF_PSEL(SPIM_MISO, 0, 5)>;
		};
	};

	spi3_sleep: spi3_sleep {
		group1 {
			psels = <NRF_PSEL(SPIM_SCK, 0, 3)>,
					<NRF_PSEL(SPIM_MOSI, 0, 4)>,
					<NRF_PSEL(SPIM_MISO, 0, 5)>;
			low-power-enable;
		};
	};
	
	uart0_default: uart0_default {
		group1 {
			psels = <NRF_PSEL(UART_TX, 0, 22)>,
				<NRF_PSEL(UART_RTS, 0, 24)>;
		};
		group2 {
			psels = <NRF_PSEL(UART_RX, 0, 23)>,
				<NRF_PSEL(UART_CTS, 0, 25)>;
			bias-pull-up;
		};
	};
	
	uart0_sleep: uart0_sleep {
		group1 {
			psels = <NRF_PSEL(UART_TX, 0, 22)>,
				<NRF_PSEL(UART_RX, 0, 23)>,
				<NRF_PSEL(UART_RTS, 0, 24)>,
				<NRF_PSEL(UART_CTS, 0, 25)>;
			low-power-enable;
		};
	};
};

&i2c2 {
	compatible = "nordic,nrf-twim";
	status = "okay";
	clock-frequency = <I2C_BITRATE_STANDARD>;
	
	bme280: bme280@76 {
		compatible = "bosch,bme280";
		reg = <0x76 >;
	};
};

&spi3 {
	status = "okay";
	cs-gpios = <&gpio0 7 0>, <&gpio0 8 0>;
	adxl372: adxl372@0 {
		compatible = "adi,adxl372";
		reg = <0>;
		spi-max-frequency = <1000000>;
	};
	atxl362: adxl362@1 {
		compatible = "adi,adxl362";
		reg = <1>;
		spi-max-frequency = <1000000>;
	};
};

&uart0 {
	status = "okay";
	current-speed = <115200>;
	pinctrl-0 = <&uart0_default>;
	pinctrl-1 = <&uart0_sleep>;
	pinctrl-names = "default", "sleep";
};

/ {
	leds {
		compatible = "gpio-leds";
		// There's also led0 available (green on-board LED 1)
		
		blue_led: blue_led {
			gpios = <&gpio0 0 0>;
			label = "Blue on-board LED 2";
		};
		
		// The below nodes are taken up by SPI/I2C.
		&led1 {
			/delete-property/ gpios;
		};
		&led2 {
			/delete-property/ gpios;
		};
		&led1 {
			/delete-property/ gpios;
		};
	};

	buttons {
		compatible = "gpio-keys";
		
		/delete-node/ button_0;
		/delete-node/ button_1;
		/delete-node/ button_2;
		/delete-node/ button_3;
		
		nrf91_btn_1: nrf91_btn_1 {
			gpios = <&gpio0 27 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
		};

		nrf91_btn_2: nrf91_btn_2 {
			gpios = <&gpio0 26 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
		};
	};
};

Related