Skip to content
axelkarPublic

About

Modern devicetree tools in Rust

Resources

Contributing

Stars

14 stars

Watchers

1 watching

Forks

Repository files navigation

Devicetree tools

🚧 NOTE: dt-tools is experimental

dt-tools helps you to write, debug and read Devicetree files more efficiently with advanced tooling!

  • IDE integration
  • Linting
  • Devicetree binding validation
  • C preprocessing matching the kernel's cpp -x assembler-with-cpp invocation for the constructs used by DTS.
  • Extensive unit and integration tests written in Rust
  • Possibly in the future:
    • Comparing DTS or DTB files
    • Comparing Android dt and dtbo partitions with /sys/firmware/fdt

Screenshots

Syntax error resiliency showcase in Neovim

Lint showcase in Neovim

Help needed

Any kinds of contributions are welcome! Just spreading awareness helps!

See the GitHub issues, especially the ones tagged with help wanted or good first issue.

If you can, take care of code containing TODO, FIXME, todo!(, unimplemented!( or similar

Contributing

Please read CONTRIBUTING.md.

LSP

dt-tools implements a language server in the dt-tools-lsp crate. The server runs as dt-tools lsp.

The VSCode extension's documentation can be found here.

The language server is also packaged for Neovim with the Lua script in ./crates/lsp/lsp.lua.

cargo build -p dt-tools
nvim --cmd 'luafile ./crates/lsp/lsp.lua' lint_showcase.dts

Features:

  • Fast and safe parser and linter
  • (TODO) View binding documentation straight from DTS!
  • (TODO) Binding errors integrated into linter

License

Licensed under either of

at your option.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Modern devicetree tools in Rust

Resources

Contributing

Stars

14 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages