# syntax error when compiling dts

**URL:** <https://forums.digi.com/t/syntax-error-when-compiling-dts/23141>\
**Category:** Linux\
**Tags:** kernel, embedded, dtb, ccimx6ulstarter, yocto\
**Created:** [June 30, 2022, 2:50pm UTC](https://forums.digi.com/t/syntax-error-when-compiling-dts/23141 "2022-06-30T14:50:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![electron](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@electron](https://forums.digi.com/u/electron)\
**Post date:** [June 30, 2022, 2:50pm UTC](https://forums.digi.com/t/syntax-error-when-compiling-dts/23141/1 "2022-06-30T14:50:42Z")

</div>

I’m trying to generate a device tree blob (dtb) from a source file but get the following error:

$ dtc -O dtb -o CIU-CR-PIN\_CONFIG.dts -o CIU-CR-PIN\_CONFIG.dtb  
Error: CIU-CR-PIN\_CONFIG.dts:15.1-9 syntax error  
FATAL ERROR: Unable to parse input tree

line 15 includes another dtsi that actually is located in the same directory, it looks like:

#include “imx6ul.dtsi”

I’m working out of ~/workspace/ccimx6ulstarter/tmp/work-shared/ccimx6ulstarter/kernel-source/arch/arm/boot/dts/ where I have copied CIU-CR-PIN\_CONFIG.dts to.  
The intention is to follow: [https://www.digi.com/support/knowledge-base/how-to-update-device-tree-file-dtb-ftd-in-the-linu](https://www.digi.com/support/knowledge-base/how-to-update-device-tree-file-dtb-ftd-in-the-linu) to load the new dtb.

---

<div class="post-metadata">

**Author:** ![electron](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@electron](https://forums.digi.com/u/electron)\
**Post date:** [July 7, 2022, 10:32am UTC](https://forums.digi.com/t/syntax-error-when-compiling-dts/23141/2 "2022-07-07T10:32:00Z")

</div>

I have since figured out, that the dts needs to be preprocessed with gcc like: cpp -nostdinc -I include -I arch -undef -x assembler-with-cpp CIU-CR-PIN\_CONFIG.dts \> CIU-CR-PIN\_CONFIG.dts.preprocessed and if I then run $ dtc -I dts -O dtb CIU-CR-PIN\_CONFIG.dts.preprocessed, I get:  
Error: imx6ul.dtsi:79.20-21 syntax error  
FATAL ERROR: Unable to parse input tree  
which is confusing as imx6ul.dtsi wasn’t touched at all.

---

<div class="post-metadata">

**Author:** ![websiteguy](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@websiteguy](https://forums.digi.com/u/websiteguy)\
**Post date:** [July 8, 2022, 10:16am UTC](https://forums.digi.com/t/syntax-error-when-compiling-dts/23141/3 "2022-07-08T10:16:33Z")

</div>

From the error messages, it looks like you’re using BeagleBone image and DTC v4.19 but the latest release of Device Tree source files on our git are for kernel v4.14 (picture attached). The syntax errors you’re seeing are probably because of the version mismatch.

---

<div class="post-metadata">

**Author:** ![zendlescentedcandle](https://avatars.discourse-cdn.com/v4/letter/z/76d3ee/32.png) [@zendlescentedcandle](https://forums.digi.com/u/zendlescentedcandle)\
**Post date:** [July 21, 2022, 9:05am UTC](https://forums.digi.com/t/syntax-error-when-compiling-dts/23141/4 "2022-07-21T09:05:58Z")

</div>

Please try load the new dtb!
