I am creating a basic device tree overlay, and I want to include a #define, but when the sentence is added to the device tree overlay (see below), the dtc reports the error:
FATAL ERROR: Unable to parse input tree
Is possible to add a #define sentence in a device tree overlay?
as I knew, it’s able to add #define into the device tree sources,
I assume you should not add the marco outside the overlay example. please have a try, thanks
I have tried to set the define in the overlay node but I have the same error (See DT overlay below). I tried to use compiler macros as __FILE__ (dtfilename = __FILE__;) and I have the same error.
I wondering if there is some flag or special node to use a #define or a macro.
I cannot reproduce the same by adding the same into device tree overlay,
can other marco works here, for example, are you able to include the header file?
I am getting this problem during the compilation time, If you try to compile the device tree overlay, Are you not able to reproduce my problem?
I am using this compilation line: dtc -O dtb -o tx2_overlay.dtbo -@ tx2_overlay.dts
Hello JerryChang,
I am not trying to build a device tree blob from sources. In my case, I am building a device tree Overlay, Nvidia provides instructions to build a basic device tree overlay (Device tree Overlay)
But I was wondering if can use a #define because when I have tried to add one, I get a compilation error, but since when we build a device tree blob we can use definitions, I supposed I can use it in a device tree Overlay as well.