r/embedded • • Sep 04 '26

Im building an IDE with a semantic engine for Device Trees

There is a lot of information about Device Trees on the internet.

The problem is that it's scattered everywhere.

You have DTS/DTSI files, bindings, schemas, kernel sources, documentation, SoC information, board definitions, examples, and different tools that each understand only part of it.

There are already tools that can do some of these things individually.

What I couldn't find was a single place that could connect all of this knowledge together.

So I've been building KernelGrove, a semantic engine for Device Trees.

Instead of treating a Device Tree as just a text file or a hierarchy of nodes, the idea is to build a knowledge model of the Device Tree and its ecosystem:

  • What a node represents
  • Which binding applies to it
  • Which properties are valid
  • What type and constraints those properties have
  • What other nodes a reference points to
  • How nodes, controllers, peripherals and buses are related
  • Where information comes from
  • And eventually, how all of this relates back to the underlying hardware

The editor is basically a way of exposing that knowledge.

For example, rather than just seeing:

uart@7e201000 {
    compatible = "brcm,bcm2835-aux-uart";
    ...
};

the goal is for the tool to understand what that node actually means and let you explore the relevant information without having to manually jump between files, schemas and documentation.

It's still very much a work in progress, and I'm trying to figure out how far this idea can be taken.

For people working with Linux Device Trees / Zephyr / Yocto:

What information do you currently have to look up manually when working on a Device Tree?

I'm particularly interested in things that you know exist somewhere, but are difficult to find or connect together.

If you want to try it, it's completely free and open source, you can find it on dt-studio.dev or https://github.com/serg4life/KernelGrove

0 Upvotes

5 comments sorted by

5

u/nameless_one_666 Sep 04 '26

Isnt better to do a vscode plugin?

1

u/Mindless-Attempt4187 Sep 07 '26

That's true, for the semantic engine part, it would be better, but the software has a Node graph view which is still under development, and at first, I thought that developing an independent app would gave me more freedom of how I design and integrate that feaure which is more visual. This was just the impression I had, I don't have any experience working with VScode extensions.

1

u/[deleted] Sep 04 '26

[removed] — view removed comment

1

u/Mindless-Attempt4187 Sep 06 '26

I created a database using the files that already exist, like .dts, .dtsi files, .yaml files, .h includes. There are a lot of bindings, as far as they are documented on kernel source files, the suggerences and autocomplete will work. But, I know that there are also some bindings that are not on kernel main branch.

For the clock, some bindings define its working range, so you can see it, but the pinctrl information its not implemented yet

1

u/rrr123rrr123 Sep 05 '26

You can try Zephyr Devicetree Manager https://marketplace.visualstudio.com/items?itemName=Ac6.devicetree-manager-for-zephyr it works for popular vendors like STM32, Silabs, NXP, ESP and others, including pinctrl.