This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Board.dts file modification (nRF Connect SDK v1.6.0-rc2)

Hello.
I need to add an output gpio to the dts file, I modified the board.dts file, inserting these lines in the leds section
res: res_ {
gpios = <& gpio0 17 GPIO_ACTIVE_LOW>;
label = "reset epaper";
};
but when I try to compile the application I get the report that the file has been modified externally and after reloading the project, I have an error.
Is there an editor to correctly edit the dts file?
what is the correct procedure to add a gpio in output or in input?
Thank you
Parents Reply
  • Hi, after looking more closely into this, every node in tree that represents a device is required to have the "compatible" property. 

    Here is an example defining the node with the "gpio-leds" binding.

    / {
    	eres_node {
    		compatible = "gpio-leds";
    		ereset: reset_ {
    			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
    			label = "reset epaper"; 
    			status = "okay";
    		};
    	};
    	aliases {
    		ereset = &ereset;
    	};
    };

    You can obviously change this property, just make sure that you include all the required properties when you do. See the Bindings index for a full list of available devicetree bindings in Zephyr. 

    Best regards,

    Heidi

Children
Related