Petalinux TCL question


In trying to get a custom board up and running I’ve copied the PynqZ-1 board in /boards and renamed it to Rob-1. I’ve gotten past the Vivado compilation with a few obstacles - check link below.

I did notice there is a file from the pynqz-1 board folder located in my new boards/Rob-1/petalinux_bsp/hardware_project/pynqz1.tcl. This should really be Rob-1.tcl since my board project is now Rob-1. This is here because I copied the Pynq-Z1 folder. I also notice that in this tcl file it says you can change the project name on line 50 of this tcl file.

Because I’m trying to make my own board, should this be changed to match my board name? i.e - change the tcl file name and change the design name on line 50? What other files need to be modified for a custom board? I don’t see reference to this one in the documentation.

This tcl file is only to create an empty block design with only PS block in it. We used the name pynq-z1 for the vivado project. In your customized case, you can start from any vivado project with your board settings - you don’t have to use this pynqz1.tcl

So is this file the same as the output tcl file from the “write_project_tcl” command?

Is this necessary to pull in the bd file created when you export the block design?

The way petalinux works is that it can start from a hdf file which is exported from vivado project. So if you already have a hdf file, you can just put it in
boards/Rob-1/petalinux_bsp/hardware_project and the make flow will pick it up there.

In our flow, we use pynqz1.tcl to generate the vivado project and export the hardware design. That way a hdf file is created from the vivado project.

Oh, so the purpose is to allow for the automation of the hdf file generation?

Yes. If you have a hdf file already you don’t have to use this tcl file. This tcl file is used to generate the block design; the makefile along with build_bitstream.tcl in the same folder is used to generate the hdf file.