cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DEJ
Visitor
Visitor
424 Views
Registered: ‎10-23-2020

PetaLinus 2019.2 device-tree failed to build for MicroZed platform possibly due to interrupt structure

I am very new to Vivado, Vitis, and PetaLinux, but have managed to design embedded user code for the Zynq 7Z020 PS that communicates directly to the PL on a MicroZed platform.  There are only a few items of note:

  1. I am using the 2019.2 revisions of Vivado (Windows 10), Vitis (Windows 10), and Petalinux (Ubuntu).
  2. Embedded user code and custom PL boot from a FAT32 partition on a microSD card and read/write data files on an exFAT partition on the same microSD card.
  3. Embedded user code accesses custom PL via AXI interface and accesses the ARM processor's interrupt system, both courtesy of Vitis.

I depended heavily on Vivado and Vitis automation to achieve the above, and now am depending heavily on PetaLinux automation to achieve the following on the MicroZed platform:

A.  I want to boot embedded Linux and custom PL from a FAT32 partition on a microSD, while having an ext4 partition for the user code's reading/writing data files.

B.  User code is no longer embedded, but rather installed on the Linux operating system and accessing custom PL and ARM processor's interrupt system via Linux drivers, which I assume will require modifications to the originally embedded user code.

My understanding is that by working through (A), I will discover how my user code can be modified for the Linux drivers and then installed on the Linux operating system to autorun on power-up.  However, I am struggling with the PetaLinux automation getting through (A) and have pasted the resulting log file from the device tree's failed build.  Prior to executing the failed petalinux-build at the command prompt, I had executed petalinux-config, making some minor tweaks before successfully exiting the config GUI.

Because I am very new to Vivado, Vitis, and PetaLinux, I don't have extreme knowledge of the makefiles, tcl files, etc, and hence my heavy dependence on all the tools' automation GUIs and the MicroZed BSP provided online.  Simple guidance would be greatly appreciated, as well as any corrections to my previously mentioned understanding of matters.

Thanks for taking the time to read and consider!  The errors in my log.do_configure.29244 appear to be related to my interrupt definitions in the xparameters.h file of my Vitis project.

-----------------------------------------------------------------------------------------------

From xparameters.h file of Vitis project:

#define XPAR_FABRIC_SDLC_ASYNC_IO_V1_0_0_INTR0_INTR 61U
#define XPAR_FABRIC_SDLC_ASYNC_IO_V1_0_0_INTR1_INTR 62U
#define XPAR_FABRIC_SDLC_ASYNC_IO_V1_0_0_INTR2_INTR 63U
#define XPAR_FABRIC_SDLC_ASYNC_IO_V1_0_0_INTR3_INTR 64U
#define XPAR_FABRIC_SDLC_ASYNC_IO_V1_0_0_INTR4_INTR 65U
#define XPAR_FABRIC_SDLC_ASYNC_IO_V1_0_0_INTR5_INTR 66U
#define XPAR_FABRIC_SDLC_ASYNC_IO_V1_0_0_INTR6_INTR 67U
#define XPAR_FABRIC_SDLC_ASYNC_IO_V1_0_0_INTR7_INTR 68U

-----------------------------------------------------------------------------------------------

From log.do_configure.29244 file of my PetaLinux project:

DEBUG: Executing shell function do_configure

MISC_ARG is  -hdf_type xsa -yamlconf /home/davidjones/mz7020_fmccc_2019_2/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx-v2019.2+gitAUTOINC+a8b39cf536-r0/device-tree.yaml

APP_ARG is  -app "device-tree"

Using xsct from: /opt/pkg/petalinux/2019.2/tools/xsct/bin/xsct

cmd is: xsct -sdx -nodisp /home/davidjones/mz7020_fmccc_2019_2/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx-v2019.2+gitAUTOINC+a8b39cf536-r0/dtgen.tcl -ws /home/davidjones/mz7020_fmccc_2019_2/build/../components/plnx_workspace/device-tree -pname device-tree -rp /home/davidjones/mz7020_fmccc_2019_2/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx-v2019.2+gitAUTOINC+a8b39cf536-r0/git -processor ps7_cortexa9_0 -hdf /home/davidjones/mz7020_fmccc_2019_2/build/tmp/deploy/images/plnx-zynq7/Xilinx-plnx-zynq7.xsa -arch 32  -app "device-tree"  -hdf_type xsa -yamlconf /home/davidjones/mz7020_fmccc_2019_2/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx-v2019.2+gitAUTOINC+a8b39cf536-r0/device-tree.yaml

INFO: [Hsi 55-2053] elapsed time for repository (/opt/pkg/petalinux/2019.2/tools/xsct/data/embeddedsw) loading 0 seconds

missing operator at _@_

in expression "61 _@_62 63 64 65 66 67 68 -..."

ERROR: [Hsi 55-1545] Problem running tcl command ::sw_device_tree::generate : missing operator at _@_

in expression "61 _@_62 63 64 65 66 67 68 -..."

    (parsing expression "61 62 63 64 65 66 67 6...")

    invoked from within

"expr $intr_id - 32"

    ("foreach" body line 81)

    invoked from within

"foreach pin ${intr_port_name} {

                set connected_intc [get_intr_cntrl_name $drv_handle $pin]

                if {[llength $connected_intc] == 0 || [string match $con..."

    (procedure "gen_interrupt_property" line 30)

    invoked from within

"gen_interrupt_property $drv_handle"

    ("foreach" body line 7)

    invoked from within

"foreach drv_handle [get_drivers] {

        # generate the default properties

        gen_peripheral_nodes $drv_handle "create_node_only"

        gen_r..."

    (procedure "::sw_device_tree::generate" line 3)

    invoked from within

"::sw_device_tree::generate device_tree"

ERROR: [Hsi 55-1442] Error(s) while running TCL procedure generate()

generate_target failed

    while executing

"error "generate_target failed""

    invoked from within

"if {[catch {hsi generate_target -dir $project} res]} {

        error "generate_target failed"

}"

    (file "/home/davidjones/mz7020_fmccc_2019_2/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx-v2019.2+gitAUTOINC+a8b39cf536-r0/dtgen.tcl" line 38)

WARNING: /home/davidjones/mz7020_fmccc_2019_2/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx-v2019.2+gitAUTOINC+a8b39cf536-r0/temp/run.do_configure.29244:1 exit 1 from 'eval xsct -sdx -nodisp /home/davidjones/mz7020_fmccc_2019_2/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx-v2019.2+gitAUTOINC+a8b39cf536-r0/dtgen.tcl -ws /home/davidjones/mz7020_fmccc_2019_2/build/../components/plnx_workspace/device-tree -pname device-tree -rp /home/davidjones/mz7020_fmccc_2019_2/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx-v2019.2+git@@@                                                                                                                                                                           

 

0 Kudos
0 Replies