Version 2023.4.61¶
Welcome to the April 2023 release of the nRF DeviceTree extension.
This release, we have been working on improving the following areas:
- Devicetree Visual Editor
- Links in build output
- Changes to linting rules
- Editing
- Devicetree View
- Workspace management
- Housekeeping
- Bug fixes
Devicetree Visual Editor¶
We've had regular feedback from users that one of the hardest parts of writing applications for the nRF Connect SDK is dealing with devicetree. Many of the concepts required to understand devicetree are new to embedded developers, and the devicetree language itself does a poor job of exposing them and making them understandable.
To address this, we've spent the past several months developing the Devicetree Visual Editor, an intuitive graphical interface that lets you interact with devicetree in a natural way and using an interface similar to the rest of the Visual Studio Code UI.
When you make changes using the Devicetree Visual Editor, the appropriate devicetree code will be written for you and added to your board's .overlay
or .dts
file. The editor acts on exactly the same devicetree file that you would edit yourself. You do not have to use it, but if you do, you can open it side-by-side with the overlay file and observe the changes as you make them. This is a great way to learn and get more familiar with the devicetree language.
The editor includes lots of features, including:
- A visual representation of the compiled devicetree structure
- Facilities for assigning nodes to pins and vice-versa
- An interactive schematic representing devicetree nodes
- Dedicated UI components for complicated devicetree concepts, such as nexus maps and registers
For this release, the Devicetree Visual Editor is marked as experimental. This means it is just the initial release of the editor, and we'll continue to develop and build on it in future releases. We're grateful for any feedback you might have, so please feel free to provide it through the dedicated Give feedback link in the lower left hand corner of the editor!
For more information and comprehensive documentation, visit the dedicated documentation page.
Links in build output¶
The build output now provides links to the corresponding node or property for devicetree C macros.
For example, on the following image, the C macro DT_N_S_soc_S_rtc_40024000_P_reg
represents the /soc/rtc@40024000/reg
property, and any occurrence of it is now clickable as a link in the build terminal and user terminals.
Changes to linting rules¶
The linting rules have received the following changes:
- The linting message for duplicate entries inside nexus maps is now formatted correctly.
- The
compatible
property is no longer reported as missing on thealias
andchosen
nodes. - The erroneous lint condition that all child nodes need
compatible
properties has been removed.
Editing¶
We have fixed some editing-related issues and modified the autocompletion behavior for the devicetree language support.
Stopped listing type bindings with no compatibles¶
Unless a binding file has a compatible
entry, it cannot be used as a type directly. These files are just made for including from other bindings, and can be considered abstract base classes for other devices. To this end, they are no longer listed in places where autocompletion is provided for binding files.
Stopped returning the current node entry in autocomplete¶
Every time you would run the Go to Definition on a label reference node, it would include the node you clicked on in the result, which would then open the CodeLens UI with the current selection as the main result. This is not needed when there is just one other definition, so now the extension will go directly to the other reference.
Fixed invalid semicolon insertions¶
There were several cases where the automatic semicolon insertion for devicetree files did not work correctly:
- It did not check for existing semicolons, and would always insert another if a closing bracket was added.
- It inserted the semicolon at the end of the replaced range instead of the end of the inserted range. This would put semicolons in the middle of the insertion if the new text was longer than the old.
Both of these issues are now fixed.
Devicetree View¶
The introduction of the Devicetree Visual Editor made it necessary to update the Devicetree View.
Removed buttons for devicetree contexts¶
With the new Devicetree Visual Editor, the buttons that were available for some of the Devicetree contexts have become somewhat redundant. For this reason, we decided to make the View go back to providing a read-only overview of these contexts.
Switched to IEC designations for units¶
Both the Devicetree View and the Devicetree Visual Editor are now using the standard IEC designations when formatting units (for example, KiB instead of kB).
Workspace management¶
Changes described in this section are related to the extension interaction with west.
Support glob patterns in devicetree.modules setting
¶
Glob support was added to the devicetree.modules
setting to ensure that all west modules in standard locations are included in the bindings indexing and include
directory search.
The default value for this setting has also been changed, so that nRF54 and ZMK directories are discovered automatically.
Housekeeping¶
- The minimum required version of Visual Studio Code has been increased to v1.66.
Bug fixes¶
- Fixed an occasional warning on startup that complained about being unable to "read
indexOf
from undefined".