cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
487 Views
Registered: ‎12-20-2017

Alternate compile flags (in recipes) in petalinux?

I'm using 2017.3 on zcu102.

 

I'd like to be able to build a "production" bootable petalinux image, and also a "debug" petalinux image and have them coexist on my build/compile environment at the same time (preferrably without copying and renaming files manually)

 

I'm thinking I like the way bitbake allows building different recipes, or the way other build tools like visual studio keep Debug and Release executables around simultaneously.

 

Alternately, maybe I should switch from petalinux to bitbake?  When I first started developing, I couldn't get bitbake to work (but I was using 2017.2, where petaliunux didn't work, either).  When I switched to 2017.3 petalinux, things started working for me, and I haven't gone back to bitbake.

0 Kudos
2 Replies
Highlighted
Voyager
Voyager
465 Views
Registered: ‎10-21-2015

Re: Alternate compile flags (in recipes) in petalinux?

Hi

Write different image recipes for production and debug.

If they are  petalinux-production.bb for production and petalinux-debug.bb for debug,

you can use petalinux-build -c petalinux-production or petalinux-build -c petalinux-debug

The recipes should be like petalinux-user-image.bb

 

You can find the generated image files under build/temp/deploy/images/plnx-zynqmp

Highlighted
Moderator
Moderator
439 Views
Registered: ‎04-24-2017

Re: Alternate compile flags (in recipes) in petalinux?

Hi @aaron_b1,

 

 

In recipes you can create dev and dbg packages. Something like this 

 

 

FILES_${PN}-dbg = "\
    ${bindir}/.debug \
    ${sbindir}/.debug \
    ${libdir}/${PN}/.debug \
    "

Then in petalinuxbsp.conf you can control enabling or disabling debug packages using EXTRA_IMAGE_FEATURES variable.

 

 

 

 

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

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