Skip to content

Commit

Permalink
README: include DTS flattening instructions
Browse files Browse the repository at this point in the history
Adds instructions for flattening DTS files that include C and/or DTSI
files.
  • Loading branch information
rmsyn committed Sep 13, 2023
1 parent d2cfca8 commit a90e437
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# cmsis-svd-generator
Generates CMSIS-SVD xml files from DTS info and Register templates in the regmaps directory.

# Generating a compatible DTS file

Many DTS files are multi-level, and have both C and DSTI includes.

To flatten the DTS file, one can run the C preprocessor and device tree compiler:

```bash
# run CPP to handle any C-style includes

cpp -nostdinc -I include -I arch -undef -x assembler-with-cpp /path/to/input.dts > processed.dts

# run DTC to handle any DTSI includes

dtc -I dts -O dts -o output.dts processed.dts

# finally, run generate-svd.py

./generate-svd.py -o output.svd -d output.dts
```

0 comments on commit a90e437

Please sign in to comment.