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: 
Visitor devarun@18
Visitor
625 Views
Registered: ‎10-12-2018

Compiler toolchain and compiler flags required for porting

Hi,

I am porting an existing 32-bit compatible application code to zynqMP(Zynq UltraScale+ MPSoC). I am new to the Xilinx platform, need help on the selection of compiler toolchain and requisite compile time flags.

 

I am using SDK version 2017.4.

 

My Goal is make this application code execute on A53 on it's kernel, built using petalinux.

 

My previous board configuration was a cortex A8 and below were the compiler options:

-march=armv7-a

-mtune=cortex-a8

-mfloat-abi=softfp

-mfpu=vfp 

 

Now as I have started porting my code and as my application is 32-bit, I am using the compiler toolchain in the below path of the SDK.

SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin

 

The compiler options I am passing is as below:

-march=armv8-a

-mtune=cortex-a53

-mfloat-abi=hard

-mfpu=vfpv3-d16

 

 

So below are my questions:

1. Is the compiler I am using, correct for 32-bit application on A53?

2. Are the compiler flags correct for the 32-bit application on A53?

3. I checked out, there are no libraries for ncurses, readelf,png,history etc in the SDK? Do I need to generate them ?

    Is there an online repository for the same?

4. If the kernel image is 64-bit, will the  32-bit application execute properly?

5. Is there a way to generate 32 bit kernel with petalinux?

 

Thanks and regards,

Dev

  

0 Kudos
2 Replies
Moderator
Moderator
550 Views
Registered: ‎10-06-2016

Re: Compiler toolchain and compiler flags required for porting

Hi devarun@18

 

1. Yes, that's the 32bit Linux toolchain

2. Depends on if you either want to use softfp or hardfp. You can just not define any of those options and the toolchain will use the default options.

3. You are right, the SDK just provides some basic libraries, for additional libraries you need to compile yourself. You can use Petalinux for it.

4. No, at least unless you also build 32-bit libraries for running it.

5. Not sure, never saw it before in Petalinux but you might want to ask in the embedded linux board.

 

Regards

Ibai


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
Visitor devarun@18
Visitor
518 Views
Registered: ‎10-12-2018

Re: Compiler toolchain and compiler flags required for porting

Hi @ibaie,
Thanks for the reply.

Regarding point 2, my application code is using softfp. So I had below questions on the same:
1. Is there a mechanism to covert code from softfp to hard?
2. Do we need a different compiler toolchain to support both multilib like both softfp and hard. If yes, does Xilinx provide one for 32-bit toolchain?

Thanks and regards,
Devarun

0 Kudos