How to add new properties

nRF Connect for VS Code

tags
nRF Connect for VS Code

The following procedure describes how to add an optional new property. The properties marked with an * are required for the selected node. A red X icon appears next to a property when it is required, but its value is not defined.

To add a new property, complete the following steps:

  1. Open the Peripherals View using the switch at the bottom right corner of the Editor.
    View switch
  2. Select the node you want to assign to a pin. You can do this from the Peripherals View or from the Nodes View. The Nodes View list is more comprehensive. In the example below, &spi20 has been selected under soc/&global_peripherals, which is not present in the Peripherals View.
    The Node Inspector panel is updated.
    Node Inspector panel (center) can be opened from Nodes or Peripherals

    Tip

    You can also click the node name in the devicetree source file and switch to the Devicetree Visual Editor using the Show Visual Editor button.
    Show Visual Editor

  3. Click the Add Property button.

    Add Property button in the Node Inspector

    A window appears.

  4. Select the property name and fill in or select its value.

  5. Click Add.
    The property is added to the node, with its location defined by the property type.
  6. Save your changes either in the editor or in the devicetree file.