03-11-2021 03:58 AM - edited 03-12-2021 12:52 AM
I'm working on a simple project using some HLS cores, Vivado, Petalinux, and Vitis.
After all the hardware workflow and successfully building the Linux image using Petalinux tools, I then moved to Vitis to start with the development of an app. Following Vitis guides, I've generated "sysroot" by using "petalinux-build --sdk" command and referenced it from a Linux Platform in Vitis (which supposedly replaces the default "sysroot"); therefore, Vitis can add "sysroot/usr/include" to the compilation paths later on in the app.
(1) My surprise is that this path is empty ("sysroot/usr/include") ; there is no folder nor include... nothing. Is that right?, what I'm doing wrong?
(2) Since Vitis does not generate a BSP for Linux systems (except for the FSBL domain) as it happens with baremetal or FreeRTOS platforms I thought the drivers must be somewhere in "sysroot," and therefore, it is one reason to include it on Vitis since most projects involve custom hardware (made in HLS or RTL) that relays on custom drivers; those drivers would be tedious to include in the project manually. So this would be somewhat equivalent to the BSP in baremetal projects. Well... I've not found any custom driver (referring to custom hardware); in my case, they're some HLS IP cores. Are my assumptions correct? What I'm missing here?. I don't mean that such drivers live in "usr/include" path, but where should they be?
Hardware is properly discovered by the OS (I believe). I mean, the device tree must be correct since I can see all devices in dev path, and all related interrupts show up as well (in proc/interrupts).
Thank you very much in advance!
03-17-2021 09:13 PM
What's the version of your Petalinux and Vitis?
As per UG1144, I suppose you should run "petalinux-build --sdk" and "petalinux-package --sysroot" to generate sysroot. So have you run "petalinux-package --sysroot"?
03-18-2021 02:08 AM
Thanks for your answer @longley
Yep, that's right I forgot running "petalinux-package --sysroot" to generate sysroot. I wrongly used the compressed rootfs generated by sdk.sh instead. When I discovered that I was tempted to answer the question, but I still don't understand why this folder is empty whereas sysroots/cortex.../usr/include is as expected. I believe it is to have a lighter filesystem but I don't know whether it is just that or there are more reasons or I'm doing something wrong and it must be populated (The latter does not make much sense now, as it was when I made the question). Regarding the second question I posted, at this point, I don't believe my drivers code is anywhere in sysroots.
BTW The Versal Project HUB and Versal Blogs look super interesting.