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
Explorer
Explorer
1,398 Views
Registered: ‎10-19-2017

G++ and GCC on PetaLinux

Jump to solution

Is there a way to develop C++/C on a Xilinx board, like the Zynq 7000 in a Linux environment? Currently, I am running on QEMU and every time I want to change the code, I have to stop QEMU, edit my application, rebuild PetaLinux, then reboot QEMU which takes a total of about 10 minutes for even the smallest change. I would like to have the ability to simply build the application within QEMU in the PetaLinux OS. This would mean including the ARM GNU Compilers in the build. Is this possible? Is there a better way to develop because I have been told by our Xilinx people that QEMU is supposed to boost development agility.

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Scholar austin
Scholar
2,164 Views
Registered: ‎02-27-2008

Re: G++ and GCC on PetaLinux

Jump to solution

Have you considered Xilinx Pynq?

 

The Python on Zynq, or now the Python on Zynq MPSoC is a really nice environment.  One can run Jupyter Notebooks, and all you need is your local web browser to take advantage of the board and application.

 

Speeding up your python application by creating c/c++ code modules is one step into the Pynq world that is not all that tough to do.  Or, you can create programmable logic designs and load them to talk to your python code (a deeper dive task into the Pynq world).

 

The vision is to only have to reference drivers, libraries, and python loads to do just about anything you need to do.  While early in the process, it is the fastest way I have seen in many years to get really complex systems up and running.

 

Back to your original question:  gcc on Zynq -- sure, no reason why it cannot be done, however; usually a program development environment needs lots of storage, internet or network connectivity, and a slew of tools (it isn't just the compiler).  That is why folks typically do not use the application board (Zedboard, ZynqMPSoC zcu102, etc.) for development.

 

Could you build a development station with everything using Zynq or ZynqMPSoC?  Sure, but a PC laptop is much easier to find, and use, and all the software is open source and free....

 

 

 

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos
2 Replies
Scholar austin
Scholar
2,165 Views
Registered: ‎02-27-2008

Re: G++ and GCC on PetaLinux

Jump to solution

Have you considered Xilinx Pynq?

 

The Python on Zynq, or now the Python on Zynq MPSoC is a really nice environment.  One can run Jupyter Notebooks, and all you need is your local web browser to take advantage of the board and application.

 

Speeding up your python application by creating c/c++ code modules is one step into the Pynq world that is not all that tough to do.  Or, you can create programmable logic designs and load them to talk to your python code (a deeper dive task into the Pynq world).

 

The vision is to only have to reference drivers, libraries, and python loads to do just about anything you need to do.  While early in the process, it is the fastest way I have seen in many years to get really complex systems up and running.

 

Back to your original question:  gcc on Zynq -- sure, no reason why it cannot be done, however; usually a program development environment needs lots of storage, internet or network connectivity, and a slew of tools (it isn't just the compiler).  That is why folks typically do not use the application board (Zedboard, ZynqMPSoC zcu102, etc.) for development.

 

Could you build a development station with everything using Zynq or ZynqMPSoC?  Sure, but a PC laptop is much easier to find, and use, and all the software is open source and free....

 

 

 

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos
Explorer
Explorer
1,380 Views
Registered: ‎10-19-2017

Re: G++ and GCC on PetaLinux

Jump to solution

I understand what you are saying, and it totally makes sense. And I appreciate that. 

 

I guess my question then is really more one of PetaLinux logistics. Perhaps a new thread should be opened for the following.

 

I have been struggling to use the XSDK to cross-compile apps to include in a PetaLinux build. It seems like in the PetaLinux tools, you can either

1.)  build an application into PetaLinux

2.)  include a prebuilt one.

 

You cannot build an application started in PetaLinux with the XSDK, to my knowledge. When creating an application within PetaLinux, the Makefile is specially made so that when you run petalinux-build, the Yocto process recognizes and sets up macros to do the compilation for you. There is also the possibility of including a prebuilt application, which I have tried. XSDK can compile for the ARM, but it seems that the XSDK will only build elf applications. My problems here are:

 

1. ) When I copy the .elf file from the XSDK workspace into my petalinux project app directory and build and boot PetaLinux with QEMU, the application does not show up in /usr/bin where it should

2. ) If I rename the application in the PetaLinux app directory, having copied it from the workspace, from <appname>.elf to <appname>, it IS built into PetaLinux and placed in /usr/bin, BUT when executed, it simply logs "Illegal Instruction."

0 Kudos