UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Participant mnanoop2014
Participant
337 Views
Registered: ‎10-29-2018

Unable to detect custom IP in linux ZCU102

Jump to solution

Hi,

I created a custom AXI4 IP that is connected to ZynqMP through an AXI interconnect. I am able to run bare metal applications perfectly (using xilinx-provided header files), able to read and write to registers in it and also verify operations of the IP. 

However, now I want to be able to do the same through an app running in linux. 
I am able to boot up linux. I have verified the device tree entry of the custom IP in <peta_home>/components/plnx_workspace/device-tree/device-tree-generation/pl.dtsi in which I only changed the compatible field to point to my custom kernel driver module, say "mm,redefine".

The driver module is created using petalinux-create -t modules command and is enabled in the petlainux-config -c rootfs. The module builds successfully without errors. Created an application using petalinux-create -t apps and also enabled it. It builds successfully too. Which just writes to some registers and reads registers (results) in the custom IP. 
And then petalinux-build it successfully.

However, when I program FPGA using petalinux-boot --jtag --fpga --bitstream <my.bit file>
And then boot linux using petalinux-boot -jtag --u-boot,
I don't see my application when I type the name of the application. And I don't see my device in /dev. I don't see my driver module in /sys/class.

Is there any reference for building linux apps and custom drivers for running applications involving custom IPs?

TIA 

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
285 Views
Registered: ‎04-24-2017

Re: Unable to detect custom IP in linux ZCU102

Jump to solution

Hi @mnanoop2014,

For custom IP unless you have linux driver with below.

  1. driver needs to be registered properly else you will not be able to see under /dev files.
  2. To access your driver from sysfs you need following API attributes to be added in driver modules to read and write value to attributes.
    • sysfs_create_file
    • sysfs_remove_file
    • device_create_file
    • device_remove_file
    • show
    • store

You can use Xilinx AXI GPIO driver as reference https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841846/AXI+GPIO and kernel docs.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
1 Reply
Moderator
Moderator
286 Views
Registered: ‎04-24-2017

Re: Unable to detect custom IP in linux ZCU102

Jump to solution

Hi @mnanoop2014,

For custom IP unless you have linux driver with below.

  1. driver needs to be registered properly else you will not be able to see under /dev files.
  2. To access your driver from sysfs you need following API attributes to be added in driver modules to read and write value to attributes.
    • sysfs_create_file
    • sysfs_remove_file
    • device_create_file
    • device_remove_file
    • show
    • store

You can use Xilinx AXI GPIO driver as reference https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841846/AXI+GPIO and kernel docs.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------