cancel
Showing results for 
Search instead for 
Did you mean: 
513 Views
Registered: ‎01-10-2017

Vitis: Cannot generate device tree

Jump to solution

Hi,

I've created a project in Vivado using the base Microblaze example.

It compiles fine, and I can export the hardware description.

In Vitis, I create a platform project based on that *.xsa file, but I cannot generate the device tree.

The only (non)-clue I have is that create_sw_design failed because of "earlier errors".

Error occurred while generating the device tree.
ERROR: [Common 17-39] 'hsi::create_sw_design' failed due to earlier errors.

Does anyone know how to find out what these "earlier errors" might be?

Or perhaps has a recipe I could follow to get this right?

Many thanks, Kevin

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
356 Views
Registered: ‎09-12-2007

Re: Vitis: Cannot generate device tree

Jump to solution

The quickest way to generate the DT (in my opinion anyway) is to just create this in XSCT. You can use the HSI API to do this. You can compile this here too (using the DTC).

 

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/136904764/Creating+Devicetree+from+Devicetree+Generator+for+Zynq+Ultrascale+and+Zynq+7000

 

The wiki is for zynq/Zynq ultrascale. However, just change the -proc to your microblaze. You can get the processor from the XSA file:

hsi::open_hw_design <path to XSA>.xsa

hsi::get_cells -filter {IP_TYPE==PROCESSOR}

hsi::close_hw_design [hsi::current_hw_design]

View solution in original post

13 Replies
Highlighted
Moderator
Moderator
505 Views
Registered: ‎08-20-2018

Re: Vitis: Cannot generate device tree

Jump to solution

Hi kevin.williams@vastech.co.za 

I am sharing a MicroBlaze based example design via EZMOVE, please use the same and see if you are still facing the issue. 

 

Best Regards,
Nutan
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution
0 Kudos
Highlighted
Moderator
Moderator
489 Views
Registered: ‎08-20-2018

Re: Vitis: Cannot generate device tree

Jump to solution

Hello Kevin,

As per our discussion over email, please share Vitis log.

Also, let me know if you can share your XSA file.

Best Regards,
Nutan
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution
0 Kudos
Highlighted
Moderator
Moderator
403 Views
Registered: ‎08-20-2018

Re: Vitis: Cannot generate device tree

Jump to solution

hi kevin.williams@vastech.co.za 

Further to our offline discussion, we checked this issue and we were able to reproduce it.

We will fix this in a future release.

As a workaround, please follow the below procedure.

1. Add a device tree repository in Xilinx -> Repositories and click on Apply and Close.

device_tree_repo.PNG

  2. Create a new platform project with device tree domain as shown below.

dev_tree_domain.PNG

3. After the platform project creation, you will see Out-of-date tag

out_of_date_MB.PNG

4. Right-click on the platform project and click on Build Project

Best Regards,
Nutan
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution
0 Kudos
Highlighted
397 Views
Registered: ‎01-10-2017

Re: Vitis: Cannot generate device tree

Jump to solution

The workaround seems like what I've been trying to do.

The only difference is that the repo shown is called "device-tree-xlnx-master" - but that is probably irrelevant.

It still gives the "create_sw_design" error though.

The tail of the log is:

16:11:03 INFO : Reading in cores from local repositories:
/home/kwilliams/git_work/device-tree-xlnx
16:11:03 INFO : Cleaning BSP projects in the workspace.
16:15:09 INFO : Successfully done sdx_reload_mss "/home/kwilliams/work/project_1/microblaze_0/device_tree_domain/bsp/system.mss"
16:20:36 ERROR : Error occurred while generating the device tree.

0 Kudos
Highlighted
382 Views
Registered: ‎07-23-2019

Re: Vitis: Cannot generate device tree

Jump to solution

 

At least with Petalinux, the device tree is not generated automatically from the xsa. I've been fighting that for a while. You have to tweak the dts according to your hardware. And it is terribly undocumented. Unfortunately. Unless you dwell in the Linux World and know those things well.

0 Kudos
Highlighted
Moderator
Moderator
357 Views
Registered: ‎09-12-2007

Re: Vitis: Cannot generate device tree

Jump to solution

The XSA will only have the IP in the Block Design. So, the DTG will generate all the nodes in the XSA. If you have an external device such as a PHY, or oscillator on a I2C bus, then yes, these would need to be added manually.

If you are not seeing a node added that you expect in the XSA, then this should be reported and it will be investigated

0 Kudos
Highlighted
Moderator
Moderator
357 Views
Registered: ‎09-12-2007

Re: Vitis: Cannot generate device tree

Jump to solution

The quickest way to generate the DT (in my opinion anyway) is to just create this in XSCT. You can use the HSI API to do this. You can compile this here too (using the DTC).

 

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/136904764/Creating+Devicetree+from+Devicetree+Generator+for+Zynq+Ultrascale+and+Zynq+7000

 

The wiki is for zynq/Zynq ultrascale. However, just change the -proc to your microblaze. You can get the processor from the XSA file:

hsi::open_hw_design <path to XSA>.xsa

hsi::get_cells -filter {IP_TYPE==PROCESSOR}

hsi::close_hw_design [hsi::current_hw_design]

View solution in original post

Highlighted
309 Views
Registered: ‎01-10-2017

Re: Vitis: Cannot generate device tree

Jump to solution

Great, this works!

My use-case is a lot of IP cores generated from Simulink with AXI4-driven registers for the setup of each, and although it would be fine to write the DTS by hand having Vitis do this is first prize. However, we have an external CPU, so I'll just need to see whether a temporary Microblaze could be used instead.

Thanks again.

0 Kudos
Highlighted
Moderator
Moderator
287 Views
Registered: ‎09-12-2007

Re: Vitis: Cannot generate device tree

Jump to solution

"My use-case is a lot of IP cores generated from Simulink with AXI4-driven registers for the setup of each"

Are there any drivers for these IP, or will you be using uio for them?

Do you have a XSA or HDF that you can send?

 

 

0 Kudos
Highlighted
249 Views
Registered: ‎01-10-2017

Re: Vitis: Cannot generate device tree

Jump to solution

I am having similar trouble with another (more representative) project, with the console method.

I have two versions of the project, one with and one without a Microblaze. I'll send these via EZMOVE, along with some documentation containing the MB memory map.

The error I get is:

 

xsct% set hdf /home/kwilliams/work/amc516_fmc217/amc516_fmc217_fpga.xsa
/home/kwilliams/work/amc516_fmc217/amc516_fmc217_fpga.xsa
xsct% hsi::create_sw_design device-tree -os device_tree -proc microblaze_0
device-tree
xsct% hsi::generate_target -dir my_dts
ERROR: [Common 17-161] Invalid option value '' specified for 'of_objects'.

ERROR: [Hsi 55-1545] Problem running tcl command ::sw_cpu::generate : ERROR: [Common 17-161] Invalid option value '' specified for 'of_objects'.

    while executing
"get_cells -of_objects $cpin"
    (procedure "gen_mb_interrupt_property" line 15)
    invoked from within
"gen_mb_interrupt_property $processor"
    (procedure "gen_cpu_nodes" line 28)
    invoked from within
"gen_cpu_nodes $drv_handle"
    (procedure "::sw_cpu::generate" line 49)
    invoked from within
"::sw_cpu::generate microblaze_0"
ERROR: [Hsi 55-1442] Error(s) while running TCL procedure generate()

ERROR: [Common 17-39] 'hsi::generate_target' failed due to earlier errors.

 

0 Kudos
Highlighted
Moderator
Moderator
227 Views
Registered: ‎09-12-2007

Re: Vitis: Cannot generate device tree

Jump to solution

The issue is that you dont have an interrupt added. This is needed for linux so is a requirment in the DTG

0 Kudos
Highlighted
212 Views
Registered: ‎01-10-2017

Re: Vitis: Cannot generate device tree

Jump to solution

Sorry, I don't understand, why is an interrupt required?

I just want to program a register via a GPIO?

0 Kudos
Highlighted
Moderator
Moderator
202 Views
Registered: ‎09-12-2007

Re: Vitis: Cannot generate device tree

Jump to solution

The devicetree generator expects an interrupt controller. You would also need an AXI timer. 

 

Have a look at page 18 in ug1144 for the HW platform pre requists