AR# 55689

|

SDK - Zynq-7000 FPU ABI configuration (mfloat-abi)

描述

The GCC toolchain included within Xilinx SDK allows users to configure the floating point ABI through the mfloat-api option.

解决方案

SDK 2015.4 and earlier versions:

The default toolchain is Sourcery CodeBench which only includes libraries compiled with the soft-float ABI. 

This means that mfloat-api=hard cannot be used and will generate a compilation error.

Invoking: ARM gcc linker
arm-xilinx-eabi-gcc -Wl,-T -Wl,../src/lscript.ld -L../../hello_a9_bsp/ps7_cortexa9_0/lib -o "hello_a9.elf"  ./src/helloworld.o ./src/platform.o   -Wl,--start-group,-lxil,-lgcc,-lc,--end-group
/proj/xbuilds/released/2017.1/GA/2017.1_0415_1/installs/lin64/SDK/2017.1/gnu/arm/lin/bin/../lib/gcc/arm-xilinx-eabi/4.9.2/../../../../arm-xilinx-eabi/bin/ld: error: ./src/helloworld.o uses VFP register arguments, hello_a9.elf does not

The default project settings of a created application do not include any specific configuration, so the toolchain makes use of mfloat-abi=softfp by default. 

This behavior can be checked by examining the disassembly code of any floating point operation.


  b = a/1.2;
  100604:    ed5b7a02     vldr    s15, [fp, #-8]
  100608:    eef70ae7     vcvt.f64.f32    d16, s15
  10060c:    eddf1b0d     vldr    d17, [pc, #52]    ; 100648
  100610:    eec00ba1     vdiv.f64    d16, d16, d17
  100614:    eef77be0     vcvt.f32.f64    s15, d16
  100618:    ed4b7a03     vstr    s15, [fp, #-12]

SDK 2016.1 and later versions:


The default toolchain is Linaro GCC which includes libraries compiled with both soft-float and hard-float ABI.

The project settings of created applications include the mfloat-abi=hard setting by default, so FPU hardware instruction are used by the toolchain.

链接问答记录

主要问答记录

Answer Number 问答标题 问题版本 已解决问题的版本
66297 SDK - 设计助手 N/A N/A
AR# 55689
日期 11/21/2018
状态 Active
Type 解决方案中心
器件
Tools
People Also Viewed