element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
MicroZed Hardware Design PetaLinus 2019.2 device-tree failed to build for MicroZed platform
  • Forums
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Avnet Boards Forums requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 9 replies
  • Answers 1 answer
  • Subscribers 41 subscribers
  • Views 671 views
  • Users 0 members are here
  • microzed
  • device-tree
  • petalinux 2019.2
  • failed build
Related

PetaLinus 2019.2 device-tree failed to build for MicroZed platform

dej1
dej1 over 1 year ago

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 attached 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!  My log file attachment was disallowed, so here are the contents of log.do_configure.29244:

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

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@@@                                                                                                                                                                             1,1           Top

  • Reply
  • Cancel
  • Cancel
  • dej1
    0 dej1 over 1 year ago

    I am replying to myself to add the following note.  The missing operator at _@_ in expression "61 _@_62 63 64 65 66 67 68 -..." in my log file appears related to the interrupt definitions in the xparameters.h file of my corresponding 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

     

    Perhaps petalinux-build is having trouble with processing the interrupts in my design

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • narrucmot
    0 narrucmot over 1 year ago

    Hi David,

     

    You may want to take a look at the PetaLinux 2020.1 BSP for the MicroZed Avnet has posted:

    http://avnet.me/zedsupport then navigate to 2020.1 -> BSP

     

    This BSP includes boot binaries for booting the Zynq FSBL, u-boot, and Linux kernel from the FAT32 partition of a SD card and using an EXT4 partition for the Linux root filesystem.  There are also examples in this BSP of custom sw and scripts that Avnet has added that may be helpful, and more can be found in Avnet's meta-avnet yocto layer repository:

    https://github.com/Avnet/meta-avnet

     

    Xilinx UG1144 may also be helpful:

    https://www.xilinx.com/support/documentation/sw_manuals/xilinx2020_1/ug1144-petalinux-tools-reference-guide.pdf

     

     

    --Tom

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • dej1
    0 dej1 over 1 year ago in reply to narrucmot

    Tom,

     

    I appreciate the provided references.  I went to http://avent.me/zedsupport and then navigated to 2020.1 -> BSP.  I now have a local copy of mz7020_fmcc_2020_1.bsp.  Does this singular file contain boot binaries for booting the Zynq FSBL, u-boot, and Linux kernel from the FAT32 partition of a SD card and using an EXT4 partition for the Linux root filesystem?

     

    I have referenced UG1144 in the past, but have never gotten PetaLinux and my user code to work together.  I don't know what I'm looking for in the Vitis_AI_1_2_PreBuilt_Example, Vitis_Platform, Vitis_Prebuilt_Example, VM_Install_Guide directories that follow the BSP directory.  I also do not understand the yocto layer repository.

     

    I do have Vivado 2019.2 & Vitis 2019.2 running and prefer to work with those versions unless version 2020.1 is a safer bet.  I can compile VHDL and user C-code, so that my Zynq boots from a FAT32 partition and runs my user code which interfaces with the programmable logic.  The user code also reads and writes files to an exFAT directory so that I can use SD cards > 32 GB.

     

    Are there concise instructions that can take me through the step-by-step process to install PetaLinux onto my SD card's FAT32 and EXT4 partitions?  My intent is then just to copy an executable of my user code into the EXT4 partition and autorun it on power-up.  My user code reads and writes Zynq programmable logic & sets up the interrupt handler in the Zynq processor, the Zynq processor responds to 8 different interrupt signals from the programmable logic and jumps me directly to 1 of 8 interrupt handler subroutines, and the Zynq also reads and writes the SD card's non-boot partition.  It seems to me that all these operations would need to go through a low level driver in PetaLinux since my code would be running on top of Linux, rather than being compiled directly for the Zynq processing system.  PetaLinux seems to have trouble setting up for 8 interrupts from the programmable logic to the processing system, so I have never gotten to the point of trying to adapt my user code to Linux low level drivers, which I understand may just be a memory map.

     

    I unfortunately don't have the foundation to implement what seems to me should consist of a set of concise instructions.  If there's any further help you can provide me, I would be very appreciative.

     

    Thank you for your time,

    David

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • narrucmot
    0 narrucmot over 1 year ago in reply to dej1

    Hi David,

     

    Yes, the mz7020_fmcc_2020_1 BSP includes the OS image binaries for the Zynq FSBL, u-boot, and Linux kernel from the FAT32 partition of a SD card and using an EXT4 partition for the Linux root filesystem.  These can be found in the <>/mz7020_fmccc_2020_1/pre-built/linux/images/ folder.

     

    Instructions for preparing the SD card for booting can be found in the MicroZed how_to_boot.txt file in Avnet's petalinux github repository:

    https://github.com/Avnet/petalinux/blob/2020.1/documentation/mz/how_to_boot.txt

     

    To make any modifications to this BSP you will need PetaLinux 2020.1.  If you plan to modify the underlying hw platform you will also need Vivado 2020.1.  The same goes for Vitis development.  The version of tools the BSP was developed with must match the version of tools used to do any further customization.  Any deviation is not supported and will likely break things.

     

    For creating a script to run an application at startup you may want to look here:

    https://www.xilinx.com/support/answers/55998.html

     

    For an application development tutorial you may want to look at Xilinx UG1165:

    https://www.xilinx.com/support/documentation/sw_manuals/xilinx2020_1/ug1165-zynq-embedded-design-tutorial.pdf

     

    --Tom

     

     

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • dej1
    0 dej1 over 1 year ago in reply to narrucmot

    Tom,

     

    Thanks!  I didn't realize I had to unzip the .bsp file which was the singular file unzipped from the .tar.gz file.

     

    I use both the following steps, correct, where step 4 loads the boot files onto the FAT32 partitions and where step 5 creates the EXT4 partition with file system?  Is step 4 run from Windows 10 laptop, while step 5 is run from the Linux laptop?

     

    4- Boot from SD (u-boot, kernel & INITRD):

        Prepare an SD card with a FAT partition.

        Copy ./BOOT_INITRD_<FULL | MINIMAL>.BIN (as BOOT.BIN), ./image_INITRD_<FULL | MINIMAL>.ub (as image.ub) and ./images/linux/boot.scr on the root folder of the partition.

        Position the BOOT Jumpers on the board to the SD mode (JP3 and JP2 to position 2-3, JP1 to position 1-2)

     

    5- Boot from SD (u-boot, kernel & Ext4 rootfs):

        Write 'rootfs.wic' on an sd card with command : sudo dd if=./rootfs.wic of=/dev/mmcblk0

        Then you can resize the 2nd partition (ext4) to fill the SD card with gparted or parted & resize2fs.

        Position the BOOT Jumpers on the board to the SD mode (JP3 and JP2 to position 2-3, JP1 to position 1-2)

     

    In step 4, what is the difference between FULL & MINIMAL?

    In step 5, is gparted a standalone program, while parted & resize2fs are Linux commands?

     

    Modifying the underlying hardware platform means adding my custom programmable logic design, correct?  How does that work its way into steps 4 & 5?

     

    My programmable logic design sends 8 different interrupts to the Zynq processing system.  I do not bundle the 8 different interrupts into one interrupt and therefore do not read registers to determine which interrupt was asserted.  The asserted interrupt simply jumps my user code execution to one of 8 different interrupt handling subroutines.  How does my user code running on Linux configure the Zynq's interrupt handler to accomplish this?

     

    How does my user code running on Linux access my programmable logic for reads and writes?

     

    With my current user code that is run directly by the MicroZed's Zynq processing system (no Linux OS), I use Xilinx header and C-code files to set up interrupts, to access my programmable logic, and to read/write data to exFAT and FAT32 partitions.  Additionally, my user code displays messages on the terminal access provided by the MicroZed's micro USB port.  I can also access the MicroZed via the GigE port.  I understand that when I go to embedded Linux OS, my exFAT partition will need to be traded out for the EXT4 partition.  PetaLinux does not support FAT32, correct?  If not, I'm OK with this as I only read/wrote data to the FAT32 boot partition to see if my code was distinguishing partitions correctly.

     

    Thanks again, Tom, I really appreciate your efforts to help me figure this out quickly as possible.

     

    -- David

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • dej1
    0 dej1 over 1 year ago in reply to narrucmot

    Because I have my own custom programmable logic design, I could not use the BSP file you referenced.  Therefore I installed PetaLinux 2020.1 onto my Linux laptop in the /home/davidjones/petalinux/2020.1 folder as follows:

     

    $  cd /home/davidjones

    $  sudo chmod 755 -R petalinux

    $  bash ./petalinux-v2020.1-final-installer.run --dir /home/davidjones/petalinux/2020.1 -pl arm

    $  source /home/davidjones/petalinux/2020.1/settings.sh

     

    Then I created a PetaLinux project in the /home/davidjones/petalinux2020.1projects folder as follows:

     

    $  cd /home/davidjones/petalinux2020.1projects

    $  petalinux-create -t project -n MicroZedSDLC --template zynq

    $  cd /home/davidjones/petalinux2020.1projects/MicroZedSDLC

     

    I then imported the .xsa file that was created by Vivado:

     

    $  petalinux-config --get-hw-description=/home/davidjones/Documents/PetaLinuxPerElement14/MicroZedXsaFile

     

    When the System Configuration window opened, the only modification I made was to go into  DTG Settings and change MACHINE NAME from template to zc702.  All other settings matched expectations of having successfully importing the .xsa file.  I then saved and exited the System Configuration, returning to the Linux prompt.

     

    I don't know why, but if I don't do the following, then petalinux-build by itself will not be able to build PetaLinux system image because of fetch file errors:

     

    $  petalinux-build -x mrproper

    $  rm -rf components/plnx_workspace/*

     

    I then attempted to build the PetaLinux 2020.1 system, and you can see where the first error occurred:

     

    $  petalinux-build

    INFO: sourcing build tools

    [INFO] building project

    [INFO] generating Kconfig for project

    [INFO] silentconfig project

    [INFO] sourcing build environment

    [INFO] generating kconfig for Rootfs

    [INFO] silentconfig rootfs

    [INFO] generating plnxtool conf

    [INFO] generating user layers

    [INFO] generating workspace directory

    INFO: bitbake petalinux-image-minimal

    Parsing recipes: 100% |#######################################################################################################################| Time: 0:01:10

    Parsing of 2961 .bb files complete (0 cached, 2961 parsed). 4230 targets, 189 skipped, 0 masked, 0 errors.

    NOTE: Resolving any missing task queue dependencies

    NOTE: Fetching uninative binary shim from file:///home/davidjones/petalinux2020.1projects/MicroZedSDLC/components/yocto/downloads/uninative/9498d8bba047499999a7310ac2576d0796461184965351a56f6d32c888a1f216/x86_64-nativesdk-libc.tar.xz;sha256sum=9498d8bba047499999a7310ac2576d0796461184965351a56f6d32c888a1f216

    Initialising tasks: 100% |####################################################################################################################| Time: 0:00:02

    Checking sstate mirror object availability: 100% |############################################################################################| Time: 0:00:12

    Sstate summary: Wanted 976 Found 801 Missed 175 Current 0 (82% match, 0% complete)

    NOTE: Executing Tasks

    NOTE: Setscene tasks completed

    ERROR: device-tree-xilinx-v2020.1+gitAUTOINC+bc84458333-r0 do_configure: Execution of '/home/davidjones/petalinux2020.1projects/MicroZedSDLC/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.1+gitAUTOINC+bc84458333-r0/temp/run.do_configure.21899' failed with exit code 1:

    MISC_ARG is  -hdf_type xsa -yamlconf /home/davidjones/petalinux2020.1projects/MicroZedSDLC/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.1+gitAUTOINC+bc84458333-r0/device-tree.yaml

    APP_ARG is  -app "device-tree"

    Using xsct from: /home/davidjones/petalinux/2020.1/tools/xsct//bin/xsct

    cmd is: xsct -sdx -nodisp /home/davidjones/petalinux2020.1projects/MicroZedSDLC/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.1+gitAUTOINC+bc84458333-r0/dtgen.tcl -ws /home/davidjones/petalinux2020.1projects/MicroZedSDLC/project-spec/configs/../../components/plnx_workspace/device-tree -pname device-tree -rp /home/davidjones/petalinux2020.1projects/MicroZedSDLC/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.1+gitAUTOINC+bc84458333-r0/git -processor ps7_cortexa9_0 -hdf /home/davidjones/petalinux2020.1projects/MicroZedSDLC/build/tmp/deploy/images/zynq-generic/Xilinx-zynq-generic.xsa -arch 32  -app "device-tree"  -hdf_type xsa -yamlconf /home/davidjones/petalinux2020.1projects/MicroZedSDLC/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.1+gitAUTOINC+bc84458333-r0/device-tree.yaml

    INFO: [Hsi 55-2053] elapsed time for repository (/home/davidjones/petalinux/2020.1/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/petalinux2020.1projects/MicroZedSDLC/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.1+gitAUTOINC+bc8445833..." line 38)

    WARNING: /home/davidjones/petalinux2020.1projects/MicroZedSDLC/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.1+gitAUTOINC+bc84458333-r0/temp/run.do_configure.21899:1 exit 1 from 'eval xsct -sdx -nodisp /home/davidjones/petalinux2020.1projects/MicroZedSDLC/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.1+gitAUTOINC+bc84458333-r0/dtgen.tcl -ws /home/davidjones/petalinux2020.1projects/MicroZedSDLC/project-spec/configs/../../components/plnx_workspace/device-tree -pname device-tree -rp /home/davidjones/petalinux2020.1projects/MicroZedSDLC/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.1+gitAUTOINC+bc84458333-r0/git -processor ps7_cortexa9_0 -hdf /home/davidjones/petalinux2020.1projects/MicroZedSDLC/build/tmp/deploy/images/zynq-generic/Xilinx-zynq-generic.xsa -arch 32 ${APP_ARG} ${MISC_ARG}'

     

    ERROR: Logfile of failure stored in: /home/davidjones/petalinux2020.1projects/MicroZedSDLC/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.1+gitAUTOINC+bc84458333-r0/temp/log.do_configure.21899

    ___________________________________

     

    The error ...

     

    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...")

     

    ... relates to the 8 interrupts going into the Zynq processing system's interrupt controller.

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • narrucmot
    0 narrucmot over 1 year ago in reply to dej1

    Hi David,

     

    It looks like the PetaLinux devicetree generator (DTG) does not know how to handle the 8 interrupts it found in your hardware platform (the .xsa file).  Normally multiple interrupts from the PL to the PS connected to the PS via a 'Concat' block like this example:

    This is a scheme that the DTG knows how to decipher, as it were, when generating the devicetree that matches the hardware.  Does your PL connect the PL-to-PS interrupts like this?

     

    --Tom

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • dej1
    0 dej1 over 1 year ago in reply to narrucmot

    Tom,

     

    Here's what I can show you of the design.  The interrupts do indeed traverse through the Concat block.  This design and the application software have been fully validated on the MicroZed when application software was running bare bones, i.e., no PetaLinux operating system.

     

    -- David

     

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • dej1
    0 dej1 over 1 year ago in reply to narrucmot

    Here is what the XILINX moderator said when I stumbled into this issue using PetaLinux 2019.2 ...

    ______________________________________________________________________________

     

    you can create a patch here in the DTG to prevent the crash. For example, I added the code below:

     

    if {[llength $intr_id] > 1} {

    puts "Warning: this is a interrupt vector and is not supported"

    continue

    }

     

    Here:

     

    https://github.com/Xilinx/device-tree-xlnx/blob/xilinx-v2020.1/device_tree/data/common_proc.tcl#L2013

     

    This will allow the DTG to pass. however, you will need to manually populate the interrupts to the system-user.dtsi

     

    For help creating patches:

     

    https://forums.xilinx.com/t5/Design-and-Debug-Techniques-Blog/PetaLinux-Image-Debug-Series-Debugging-the-Device-Tree-Generator/ba-p/1157624

    ______________________________________________________________________________

     

    ... I do not understand how to find and identify the file in which to insert "if {[llength $intr_id] > 1 ..."  Nor do I understand where in said file to insert this conditional.

     

    In my 2020.1 project you've been helping me with, I did find /home/davidjones/petalinux2020.1projects/MicroZed//project-spec/meta-user/recipes-bsp/device-tree/files/ system-usr.dtsi.  However, I do not know the syntax for manually populating the interrupts.

     

    I'm hoping this gives you enough hints on how to help me.  I don't know enough to understand how to implement the XILINX moderator's suggestion, despite the references he gave me.  Further attempts to seek understanding merely get referred back to what the XILINX moderator stated above.

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube