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
Observer pritya
Observer
979 Views
Registered: ‎10-13-2017

How to run clang for xilinx u-boot

Hi,

 

   I would like run clags for u-boot source code

I followed following processes.

1)

       1 . scan-build-3.5 make zynq_zed_defconfig

       2 . scan-build-3.5 make

ERROR : But it throws "lib/asm-offsets.c:1:0: error: bad value (armv5) for -march= switch
 /*"
 ^

 

2)

       1 . make HOSTCC=clang-3.5 CROSS_COMPILE=arm-linux-gnueabihf- CC=clang-3.5  zynq_zed_defconfig

       2 . make HOSTCC=clang-3.5 CROSS_COMPILE=arm-linux-gnueabihf- CC=clang-3.5 -j8

ERROR : clang: warning: argument unused during compilation: '-ffixed-r9'
error: unknown target CPU 'armv5'

 

and I read document in doc/README.clang.

 

Is any other tools are available similar to clang.

0 Kudos
4 Replies
Moderator
Moderator
943 Views
Registered: ‎12-04-2016

Re: How to run clang for xilinx u-boot

Hi

 

See if this patch helps.You might need to modify this patch to have zynq config,

https://patchwork.ozlabs.org/patch/598860/

 

Best Regards

Shabbir

0 Kudos
Observer pritya
Observer
906 Views
Registered: ‎10-13-2017

Re: How to run clang for xilinx u-boot

Regret for late reply since i  was out of station.

 

I tried above patch, already everything is applied but in FreeBSD 11.

 

NOTE : For cross compiler, I have exported PATH with <petalinux_install_path>/tools/linux-i386/gcc-arm-linux-gnueabi/bin/

 

I am not able to find "arm-gnueabi-freebsd-as"  niether in "/usr/local/bin/" nor "<petalinux_install_path>/tools/linux-i386/gcc-arm-linux-gnueabi/bin/".

 

Whereas with present exported path I am getting same error as

 

OUTPUT :

 

# make HOSTCC=clang-3.5 CROSS_COMPILE=arm-linux-gnueabihf- CC=clang-3.5 -j8
  CHK     include/config/uboot.release
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  HOSTCC  scripts/basic/fixdep
  CFG     u-boot.cfg
clang: warning: argument unused during compilation: '-ffixed-r9'
error: unknown target CPU 'armv5'
Makefile:928: recipe for target 'u-boot.cfg' failed
make: *** [u-boot.cfg] Error 1
make: *** Waiting for unfinished jobs....

 

0 Kudos
Moderator
Moderator
902 Views
Registered: ‎12-04-2016

Re: How to run clang for xilinx u-boot

Hi

 

As Xilinx officially doesnt support running clang from u-boot, petalinux doesnt come with this toolchain. You have to export it externally.

 

 

Best Regards

Shabbir

0 Kudos
Observer pritya
Observer
894 Views
Registered: ‎10-13-2017

Re: How to run clang for xilinx u-boot

I am bit confused about tool chain.

 

Can you please explain which to be exported explicitly "arm-linux-gnueabi-" or "arm-freebsd-eabi-"

 

Can you please share download link  ?

 

 

0 Kudos