cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
joancab
Teacher
Teacher
487 Views
Registered: ‎05-11-2015

Auto run app with Vitis

Jump to solution

 

On Petalinux User Guide there is an explanation on how to make a Linux app run automatically after boot.

I wonder if the same can be done in Vitis or do I have to get the linux boot and image plus application and go back to Petalinux, which seems to me going back.

0 Kudos
1 Solution

Accepted Solutions
stephenm
Xilinx Employee
Xilinx Employee
375 Views
Registered: ‎09-12-2007

A typical flow would be to develop an an in the Vitis IDE, then once you are content that it works. You can add this as a prebuilt binary in Petalinux:

 

https://www.xilinx.com/support/documentation/sw_manuals_j/xilinx2020_1/ug1144-petalinux-tools-reference-guide.pdf

 

See page 83

View solution in original post

9 Replies
stephenm
Xilinx Employee
Xilinx Employee
452 Views
Registered: ‎09-12-2007

What device are you using?

If on a non SoC/ACAP then once you have the ELF in BRAM and program the device the Microblaze will execute once the MB comes out of reset.

For a SoC/ACAP you can create a boot image that has your bootloader (fsbl/pdi), bitstream (optional), and the user app. Then you can boot from SD card or QSPI.

If you want to debug this, then in your debug config set the Debug type as debug on running target

0 Kudos
olupj
Explorer
Explorer
425 Views
Registered: ‎01-27-2008

@joancab 

I haven't worked extensively with Petalinux but it's busybox-based. I think you can start services using init.d and some simple scripts therein, as there's no systemd.

Jerry

0 Kudos
joancab
Teacher
Teacher
403 Views
Registered: ‎05-11-2015

@stephenm I'm using Zynq Ultrascale+. With Petalinux I was able to generate FSBL, u-boot, kernel image, etc. With Vitis I was able to compile an application and generate an elf file. What I want is the board to boot and run the application embedded on its rootfs. With petalinux, apparently, I have to tweak the rootfs and compile again the application from its sources, therefore all Vitis can do for me is useless, that's why I'm wondering if I'm missing something.

0 Kudos
stephenm
Xilinx Employee
Xilinx Employee
392 Views
Registered: ‎09-12-2007

If you want to add your custom app to the filesystem then you can do this in Petalinux. You don't need to rebuild everything. Just your app

petalinux-build -c your_app

0 Kudos
joancab
Teacher
Teacher
389 Views
Registered: ‎05-11-2015

@stephenm in that case, building it with Vitis is a waste of time? That's what I mean. By using Vitis, I expect a flow that ends in something I can bring to my board. Or at least that it takes some steps and then carry on with another tool. So, I didn't need to build it with Vitis, just write my source and compile with Petalinux? 

0 Kudos
stephenm
Xilinx Employee
Xilinx Employee
386 Views
Registered: ‎09-12-2007

If you want to debug your application and test on your board, you would use the Vitis IDE. If you just want to create an app and have it run directly from the rootfs, then use Petalinux.

0 Kudos
joancab
Teacher
Teacher
377 Views
Registered: ‎05-11-2015

The second, so I will use petalinux, in that case, if I build the app with petalinux, I assume I don't have to build it with Vitis. Cannot I copy the Vitis generated elf into the rootfs? I assume petalinux will generate the same elf?

 

0 Kudos
stephenm
Xilinx Employee
Xilinx Employee
376 Views
Registered: ‎09-12-2007

A typical flow would be to develop an an in the Vitis IDE, then once you are content that it works. You can add this as a prebuilt binary in Petalinux:

 

https://www.xilinx.com/support/documentation/sw_manuals_j/xilinx2020_1/ug1144-petalinux-tools-reference-guide.pdf

 

See page 83

View solution in original post

joancab
Teacher
Teacher
368 Views
Registered: ‎05-11-2015

I rarely debug. Reasons are: not real-time and many random crashes that bring added uncertainty whether it was the debug environment or the sw itself. That's probably why I find that flow weird. For helloworlders is fine I guess, they can even step into the print command.

0 Kudos