03-11-2019 05:39 PM
I have developed a custom ZU27-based RFSoC product. Using the 2018.3 version of Vivado, the SDK and the Petalinux toolchain and referencing Wiki document Creating Linux application targeting the RFDC driver in SDK 2018.3, I have successfully embedded the RFdc driver and it's example programs within the target linux environment. The resulting xrfdc-selftest example runs under Linux on our target platform.
However, the process of embedding pre-written example code into the petalinux image is wholly insufficient for development of new custom applications. For that, it is imperative that I be able to interactively cross-compile and cross-debug custom applications which make use of the RFdc driver from within the Vivado SDK.
I have generated the SDK files using the petalinux commands:
But, I can find no documentation detailing how to use the generated sdk tree to facilitate cross-development from the Vivado SDK.
I have searched the entire petalinux project tree and have not located any RFdc library files or headers that would enable cross-development of custom applications using this driver.
By contrast, I have been able to find and make use of the openAMP libmetal headers and libmetal.so library (which were generated into the petalinux project tree by the above commands) to cross-develop and debug applications that access the features of this library using custom C++ code and the Xilinx SDK.
I seek a similar capability to access the RFdc driver from within applications developed using the Xilinx SDK and custom C++ code. Please detail this process or provide a reference containing this information.
03-12-2019 06:46 PM
I have discovered how to cross-compile applications employing the rfdc driver, which is dependent on the libmetal library. In hopes of benefiting others, I have added the notes below.
The wiki linked in my earlier post is sufficient to build the rfdc driver and Xilinx-supplied test code into the target petalinux image. But I failed to grok the significance of the instructions:
specified within the wiki which generate headers and library files within the petalinux image that may be referenced within user Xilinx SDK projects to cross-compile applications making use of the rfdc driver and/or metal library.
The specific changes needed to Xilinx SDK projects are detailed within the Libmetal and OpenAMP for Zynq Devices User Guide. Chapter 2, section "Build Libmetal Linux Demo in Xilinx SDK" details the steps required. Insure that the "sysroot" setting within the Project Properties | Tool Settings tab | Settings | Miscellaneous | Linker Flags points to the root of your petalinux generated sdk/ tree. In my case, I created a symbolic link to the sdk tree at /home/jim/share/projects/PXIE-1000/images/linux/sdk, so my corresponding sysroot specification was:
Then, to allow the xrfdc and metal headers to be found during compilation, I added the include path
to Project Properties | Tool Settings tab | Settings | Directories | Include Paths within my SDK project.
Finally, I added metal and rfdc to the libraries within
Project Properties | Tool Settings tab | Settings | Libraries in my project.
Subsequently, my C++ application successfully cross-compiled and ran on my ZU27 target.
11-28-2019 11:36 AM
Thanks a lot for sharing your finidngs. That actually took me out of the rabit hall after couple days of spining.