Edge AI & Software, Cloud Systems

Renode dts2repl

The dts2repl project is a tool for converting device tree sources into Renode's .repl files.


Contributors
27

Created
3 years ago

License
Apache-2.0

Languages

python(60.97%)
Renode platform(23.08%)
json(9.00%)
shell(3.46%)
Others(3.49%)

Renode dts2repl

Copyright (c) 2022-2024 Antmicro

The dts2repl project is a tool for converting device tree sources into Renode's .repl files.

Installation

Use pip to install this package:

pip3 install git+https://github.com/antmicro/dts2repl.git

Usage

Generating the device tree

For this tool to work, you need to have access to the flattened device tree file. You can obtain it by manually preprocessing your device tree sources with GCC, for example:

gcc -H -E -P -x assembler-with-cpp -I include/ -I dts/riscv -I dts/common boards/riscv/hifive1/hifive1.dts 1>flat.dts 2>includes.txt

Some boards need additional overlays located under dts2repl/overlay to be used to generate a proper repl file. These overlays are matched automatically by using the platform-level compatible string from the / root node, and from the /soc node.

Generating the repl file

You can use this tool either directly from the commandline, i.e.:

dts2repl path/to/flattened_devicetree.dts

or by importing and using it in your Python script:

from dts2repl import dts2repl

print(dts2repl.generate("path/to/flattened_devicetree.dts"))

Relevant projects

Nothing found

Apologies, but no results were found.

If you’d like to build a commercial product based on our open source solutions, reach out to us via the contact form.