06-02-2015 03:45 PM
I have a Zybo Zynq 7000 and I am using Vivado 2014.4 and have created a custom logic design. I can successfully generate the new .bit bitstream file from the design, and have since exported the hardware to the SDK and have been able to generate a new BOOT.bin (comprised of a new fsbl.elf, .bit, and uboot.elf). I have the new system.dts file from the SDK but have been unsuccessful in compiling it into a device tree blob. The linux distribution I have been using the device tree compiler in is Ubuntu 14.04. I get the following error:
Error: pl.dtsi:7.2-8 syntax error
FATAL ERROR: Unable to parse input tree
I have tried a million and 1 things to try and generate the .dtb but I just cannot seem to do it. Does anyone know what is causing this error? Any suggestions or help is very much appreciated, I have been stuck for days. I can attach any neccessary files if you need further details, just let me know.
06-02-2015 05:01 PM
Sorry for the double post, I wasn't sure how to edit my orignal post.
After quite a bit of trial of error and googling, I came across this article http://www.wiki.xilinx.com/Zynq+Linux with the following relevant information:
Device Tree Generator
Xilinx SDK supports the Device Tree Generator for Zynq. For Linux kernel 3.3 and later, the device tree syntax has changed for denoting interrupts. To calculate the correct value in these releases, use Table 7-3 in the Zynq-7000 AP SoC TRM to locate the correct SPI ID# for the desired peripheral. Then, subtract 32 from this value. The result is what should be entered into the device tree interrupt field.
Example: From Table 7-3, UART 1 has a value of "82" for the SPI ID#. Subtracting 32 from this yields "50." "50" is the value found in the interrupt field for the UART 1 peripheral in the device tree
I checked the lines that the device tree compiler was reporting syntax errors on, and sure enough they were lines that dealt with interrupts, specifically the following line in the VDMA IP core (there were 2 interrupt lines):
interrupts = <-1>;
From the above quote, it says to reference the table found in this documentation http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf to find the correct SPI (Shared Peripheral Interrupt) ID#. However, as mentioned above, the thing that was causing errors was the VDMA, and there doesn't seem to be a corresponding value for it in the table reference in the above documentation.
Can anyone help identify which values I should replace the <-1> with for the VMDA interrupts?
06-08-2015 07:14 AM
I always use the generated xparameters.h file found in the bsp project when exporting to SDK to figure out what values to use, from there I subtract 32. Example, from my xparameters.h (I search for interrupts):
/***Definitions for Core_nIRQ/nFIQ interrupts ****/
/* Definitions for Fabric interrupts connected to ps7_scugic_0 */
#define XPAR_FABRIC_AXI_DMA_0_S2MM_INTROUT_INTR 61
#define XPAR_FABRIC_AXI_UART16550_0_IP2INTC_IRPT_INTR 62
#define XPAR_FABRIC_AXI_UART16550_1_IP2INTC_IRPT_INTR 63
So my device tree entries will use 29 for the S2MM_DMA, 30 for UART-16550_0, and 31 for UART-16550_1. May that will help?
06-08-2015 12:56 PM
I am using the SDK to automatically generate the .dts. I have a design in Vivado and I use the File->Export to Sdk functionality to launch the SDK. In reply to your most recent post as well, I am using the Xilinx DTC and am able to compile the .dtb now. Thank you.
As I mentioned, now I have just trying to figure out what the proper values are for the interrupts for the VDMA.
Thank you for your post and the example, that certainly helps. I will try looking at the xparameters.h for the values but I am thinking they should be similar to what you have in your example.
06-08-2015 07:42 PM
Have you looked at "Table 7-4: PS and PL Shared Peripheral Interrupts" in UG585? This give a quick assignment of all the available interrupts into the Zynq.