Skip to content

Devicetree contexts

Devicetree contexts consist of a board file and a list of overlay files. Each context corresponds to a single compiled devicetree file that goes into a build.

If you work with more than one application or board, you will have multiple sets of devicetree contexts - one for each of your builds. Every time you open a new devicetree file, the extension will add a devicetree context unless this file is already part of an existing context.

The devicetree contexts show up in the Devicetree View in the Sidebar.

Devicetree contexts

Each devicetree context presents an overview of common resources and their users. Each entry in the overview is linked with a specific node or property in the devicetree. Clicking one of these will go to the primary definition to the linked node or property.

Within the contexts, you can create a devicetree alias on a selected node if applicable. To do this:

  1. Select the node you want to create an alias for.

  2. Click on the More actions... menu icon.

  3. Click on Add Alias.

Board Board

This is a list of information related to your connected board. It includes the name, architecture, supported features, and supported toolchains.

GPIO GPIO

This is a list of all known GPIO controllers, which are determined by the gpio-controller property. Each GPIO controller presents a list of the allocated pins and their owners inferred from gpios properties, -pins properties, and pinctrl properties.

The pin icon to the left of each GPIO pin indicates whether a pin is connected. A filled-in icon indicates a connected pin, and an unfilled-in icon indicates an unconnected pin.

GPIO pin icons

The GPIO context also lets you copy the associated C identifier of a given node using the action Copy C Identifier of Node.

Flash Flash

This is a list of all flash controllers, or nodes, based on the soc-nv-flash type binding. If the flash controllers contain a fixed-partitions node, each partition will be listed with their size and address. Any unallocated space in the flash area will also be listed.

Interrupts Interrupts

This is a list of all interrupt controllers determined by the interrupt-controller property. It lists the allocated interrupts on the controller and their users, as well as any other available information, such as their priority and index.

When hovering over a node, the More actions... menu icon appears to the right. Click on it to access the following actions:

  • Edit Property Value - edit the value of the selected node in the target devicetree file.

  • Disable Node or Enable Node - disable or enable the selected node.

  • Remove node - remove the selected node from the target devicetree file.

Options for Interrupts

The Interrupts context also lets you create an alias for the selected node using the action Add Alias.

Buses Buses

This is a list of all known buses on the device determined by the bus entry in the node's type binding. It lists important properties of the bus, such as clock speed and flow control, as well each node on the bus and their address if the bus has an address space. If the bus is an SPI bus, the chip select configuration of each node is also listed if it is known.

When hovering over a node, you can see a description of the node's binding. You can also see the More actions... menu icon to the right. Click on it to access the following actions:

  • Enable Node or Disable Node - opens the .overlay file in the editor and sets status = disabled" or "enabled".

  • Add Node to Bus - opens a drop-down list of available nodes to add to your board. After choosing a node, the .overlay file opens in the editor and the node information is added.

  • Remove Node - removes the selected node from the .overlay file.

Bus node options

The Buses context also lets you copy the associated C identifier of a given node using the action Copy C Identifier of Node, as well as create an alias for the selected node using the action Add Alias.

ADCs ADCs

This is a list of all ADC controllers on the device, or nodes, based on the adc-controller type binding. Each ADC controller contains a list of all allocated channels based on references made to the ADC instances using the io-channels property.