I’m trying to make an image to install to a verdin card using an external media device, but when I use the command torizoncore-build I receive a syntax error on verdin-gpio-overlay. This dts it’s the original that is downloaded from the repository of Toradex and it’s no modified.
Hi, I’m the Toradex AI Assistant.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Troubleshooting Device Tree Overlay Compilation Errors
The syntax error you’re encountering with the verdin-gpio-overlay.dts
file during TorizonCore Builder compilation can have several causes. Let me guide you through the troubleshooting steps.
Common Causes and Solutions
1. Include Directory Configuration
Device tree overlays require proper include directories to access header files. When using TorizonCore Builder with a configuration file, ensure you have the correct include-dirs
specified (1):
customization:
device-tree:
include-dirs:
# Folder that contains common kernel header files like gpio.h
- linux/include
# Folder that contains SoC-specific header files for TI, like k3-pinctrl.h
- linux/arch/arm64/boot/dts/ti/
2. Kernel Version Compatibility
Custom device trees must match the kernel version of your Torizon OS image (2). Device trees that worked in earlier TorizonCore versions may not be compatible with newer versions. If you are moving from a previous major version, always re-base your device tree on the version provided in the Linux source tree for your current Torizon OS version (2).
3. Header File Dependencies
Device tree overlays typically include header files that must be available during compilation (1). Common includes for Verdin modules are:
<dt-bindings/gpio/gpio.h>
for GPIO macros- SoC-specific pinmux headers (e.g.,
k3-pinctrl.h
for TI-based SoMs, orimx8mm-pinfunc.h
for NXP-based SoMs)
Recommended Troubleshooting Steps
1. Verify File Structure
Ensure your project directory structure includes the necessary kernel source files and headers (1):
├── linux
├── device-trees
│ └── overlays
│ └── verdin-gpio-overlay.dts
├── tcbuild.yaml
└── <your-torizon-image>
2. Check Configuration File
Make sure your tcbuild.yaml
file properly specifies the include directories and custom device tree (1):
customization:
device-tree:
include-dirs:
- linux/include
- linux/arch/arm64/boot/dts/ti/ # For TI-based SoMs
custom: linux/arch/arm64/boot/dts/ti/k3-am625-verdin-wifi-dahlia.dts
add:
- /device-trees/overlays/verdin-gpio-overlay.dts
3. Use Fresh Device Tree Sources
If you’re upgrading between major Torizon OS versions, start with a fresh device tree from the current kernel sources rather than using older versions (2). Re-clone the device tree from the current kernel sources and carefully apply your customizations.
4. Test with Minimal Changes
Start with the base image and incrementally apply customizations (2). Make and test one change at a time, checking for compilation errors after each modification.
Alternative Approaches
If you continue experiencing issues, consider using the individual TorizonCore Builder commands instead of the configuration file approach (3):
- Use
dto apply
to apply device tree overlays individually - Use the
--force
flag if you need to bypass compatibility checks during development
The dto apply
command compiles a device tree overlay source file and tests if it’s applicable against the current device tree (3).
Best regards, Toradex AI Assistant.
Hello @LuisSerrano ,
Thank you for reaching out.
Usually when this kind of issue occurs it’s either related to the syntax itself, or caused by a missing include in the overlay. The best way to confirm is by checking line 16, as indicated in the error log.
Could you please share with us which exact Toradex OS version you are using, as well as the full .dts overlay file? This will help us reproduce the issue on our side and provide a more precise solution.
Best regards,
I’m using Toradex OS 6.8 and this is the dts file
verdin_gpio_overlay.dts (1.9 KB)