cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dm78
Adventurer
Adventurer
990 Views
Registered: ‎03-15-2012

IP Packager Parameter to device-tree

hi,

i have a custom ip core (created via ip packager) inside my block diagram. Is there a way to set some kinds of parameters gets forwarded to the device-tree generated via device-tree-generator?

I'm using Linux and would like set some kind of information in the block diagram, which are then available for a custom kernel driver. I'm aware of adding information to the device-tree manually, but i would like to keep it easy and in one place.

Many thanks

0 Kudos
4 Replies
stephenm
Moderator
Moderator
950 Views
Registered: ‎09-12-2007

The device tree generator uses HSI API to add, and populate device tree nodes. You would need to update the device tree generator to add the code to populate you node.

You can see how this is done for simple ip such as gpio and use this as reference

https://github.com/Xilinx/device-tree-xlnx/blob/master/axi_gpio/data/gpio.tcl

 

For more info on the HSI 

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841693/HSI+debugging+and+optimization+techniques

 

 

dm78
Adventurer
Adventurer
918 Views
Registered: ‎03-15-2012

what i was looking for are the custom parameters starting with "C_" like "C_xyz". These are forwarded like

xlnx,xyz = <0>;

for numbers and

xlnx,xyz = "test";

for strings.

0 Kudos
Reto
Observer
Observer
105 Views
Registered: ‎07-29-2020

Hi @stephenm 

I added the code form https://github.com/Xilinx/device-tree-xlnx/blob/master/axi_gpio/data/gpio.tcl to my IP and make the petalinux-compile run.
This ends up in the following messages:

invalid command name "get_comp_str"


Why does it not find this internal function?
Could it be, that Vitis needs to be installed?

Thank you for your help.

Kind regards
Reto Meier

Full message:

| ERROR: Execution of '/home/reto.meier/Documents/olymp/projects/arina/os/arina/build/tmp/work/zynqmp_generic-xilinx-linux/pmu-firmware/2020.2+gitAUTOINC+08b9f4304d-r0/temp/run.do_configure.65749' failed with exit code 1:
| MISC_ARG is  -yamlconf /home/reto.meier/Documents/olymp/projects/arina/os/arina/build/tmp/work/zynqmp_generic-xilinx-linux/pmu-firmware/2020.2+gitAUTOINC+08b9f4304d-r0/pmu-firmware.yaml
| APP_ARG is  -app "ZynqMP PMU Firmware"
| Using xsct from: /home/reto.meier/pkg/tools/xsct/bin/xsct
| cmd is: xsct -sdx -nodisp /home/reto.meier/Documents/olymp/projects/arina/os/arina/build/tmp/work/zynqmp_generic-xilinx-linux/pmu-firmware/2020.2+gitAUTOINC+08b9f4304d-r0/app.tcl -ws /home/reto.meier/Documents/olymp/projects/arina/os/arina/build/tmp/work/zynqmp_generic-xilinx-linux/pmu-firmware/2020.2+gitAUTOINC+08b9f4304d-r0/build -pname pmu-firmware -rp /home/reto.meier/Documents/olymp/projects/arina/os/arina/build/tmp/work/zynqmp_generic-xilinx-linux/pmu-firmware/2020.2+gitAUTOINC+08b9f4304d-r0/git -processor psu_pmu_0 -hdf /home/reto.meier/Documents/olymp/projects/arina/os/arina/build/tmp/deploy/images/zynqmp-generic/Xilinx-zynqmp-generic.xsa -arch 32  -app "ZynqMP PMU Firmware"  -yamlconf /home/reto.meier/Documents/olymp/projects/arina/os/arina/build/tmp/work/zynqmp_generic-xilinx-linux/pmu-firmware/2020.2+gitAUTOINC+08b9f4304d-r0/pmu-firmware.yaml
| INFO: [Hsi 55-2053] elapsed time for repository (/home/reto.meier/pkg/tools/xsct/data/embeddedsw) loading 0 seconds
| Opening the hardware design, this may take few seconds.
| invalid command name "get_comp_str"
| ERROR: [Hsi 55-1545] Problem running tcl command ::sw_hsdp_switch_v1_0::generate : invalid command name "get_comp_str"
|     while executing
| "get_comp_str $drv_handle"
|     (procedure "::sw_hsdp_switch_v1_0::generate" line 9)
|     invoked from within
| "::sw_hsdp_switch_v1_0::generate hsdp_switch_0"
| ERROR: [Hsi 55-1442] Error(s) while running TCL procedure generate()
| Failed to generate bsp for application zynqmp_fsbl
|     while executing
| "builtin_platform -addbootdomains "
|     (procedure "platform" line 393)
|     invoked from within
| "platform create -name $params(hwpname) -hw $params(hdf) -out $params(ws)"
|     invoked from within
| "if { $params(ws) ne "" } {
| 	#Local Work Space available
| 	if { $params(pname) ne "" } {
| 		# hwpname/bspname is empty then default it to pname+_hwproj/b..."
|     (file "/home/reto.meier/Documents/olymp/projects/arina/os/arina/build/tmp/work/zynqmp_generic-xilinx-linux/pmu-firmware/2020.2+gitAUTOINC+08b9f4304d-r0/app.t..." line 139)
| WARNING: /home/reto.meier/Documents/olymp/projects/arina/os/arina/build/tmp/work/zynqmp_generic-xilinx-linux/pmu-firmware/2020.2+gitAUTOINC+08b9f4304d-r0/temp/run.do_configure.65749:1 exit 1 from 'xsct -sdx -nodisp /home/reto.meier/Documents/olymp/projects/arina/os/arina/build/tmp/work/zynqmp_generic-xilinx-linux/pmu-firmware/2020.2+gitAUTOINC+08b9f4304d-r0/app.tcl -ws /home/reto.meier/Documents/olymp/projects/arina/os/arina/build/tmp/work/zynqmp_generic-xilinx-linux/pmu-firmware/2020.2+gitAUTOINC+08b9f4304d-r0/build -pname pmu-firmware -rp /home/reto.meier/Documents/olymp/projects/arina/os/arina/build/tmp/work/zynqmp_generic-xilinx-linux/pmu-firmware/2020.2+gitAUTOINC+08b9f4304d-r0/git -processor psu_pmu_0 -hdf /home/reto.meier/Documents/olymp/projects/arina/os/arina/build/tmp/deploy/images/zynqmp-generic/Xilinx-zynqmp-generic.xsa -arch 32 -app "ZynqMP PMU Firmware" -yamlconf /home/reto.meier/Documents/olymp/projects/arina/os/arina/build/tmp/work/zynqmp_generic-xilinx-linux/pmu-firmware/2020.2+gitAUTOINC+08b9f4304d-r0/pmu-firmware.yaml'
| 
ERROR: Task (/home/reto.meier/Documents/olymp/projects/arina/os/arina/components/yocto/layers/meta-xilinx-tools/recipes-bsp/pmu-firmware/pmu-firmware_git.bb:do_configure) failed with exit code '1'







0 Kudos
stephenm
Moderator
Moderator
85 Views
Registered: ‎09-12-2007

Yes, you need Vitis for this as it uses XSCT