This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2564C: n/a

Part Number: CC2564C

I have met such issue when cross compile TI Bluetooth add-on for Linux version v4.2.1.1.1.0 

Compile error as below

LN BTPMSRVR_S.o libBTPM_S.a libBTPM_HAL_S.a libSS1BTAUD.a libSS1BTGAV.a libSS1BTAVC.a libSS1BTAVR.a libSS1SBC.a libSS1BTFTP.a libSS1BTHDP.a libSS1BTHDS.a libSS1BTHIDH.a libSS1BTHID.a libSS1BTPAN.a libBTPS_VNET.a libSS1BTPBA.a libSS1BTHFR.a libSS1BTMAP.a libSS1BTOPP.a libSS1BTCTS.a libSS1BTNDCS.a libSS1BTRTUS.a libSS1BTDIS.a libSS1BTGAT.a libSS1BTGAPS.a libSS1BTCSCS.a libSS1BTHIDS.a libSS1BTNDC.a libSS1BTRTU.a libSS1BTIAS.a libSS1BTHRS.a libSS1BTSCP.a libSS1BTLLS.a libSS1BTBAS.a libSS1BTTPS.a libBTPS.a libBTPS_PLA.a libBTPS_OSA.a -o SS1BTPM

/nshao_repo/tmo/HB_Tools/32/toolchain/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/5.2.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: error: obj/BTPMSRVR_S.o uses VFP register arguments, ../BluetopiaPM/bin/SS1BTPM does not

/nshao_repo/tmo/HB_Tools/32/toolchain/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/5.2.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: failed to merge target specific data of file obj/BTPMSRVR_S.o

/nshao_repo/tmo/HB_Tools/32/toolchain/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/5.2.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: error: ../BluetopiaPM/lib/libBTPM_S.a(BTPMMAIN_S.o) uses VFP register arguments, ../BluetopiaPM/bin/SS1BTPM does not

/nshao_repo/tmo/HB_Tools/32/toolchain/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/5.2.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: failed to merge target specific data of file ../BluetopiaPM/lib/libBTPM_S.a(BTPMMAIN_S.o)

It seems trying to link BTPMSRVR_S.o with libBTPM_S.a and other static library

I checked BTPMMAIN_S.o(inside libBTPM_S.a) with readelf -A

nshao@TMO_Env:/nshao_repo/tmo/AM335xBluetopiaLinuxProduction-4.2.1.1.1.0/build$ readelf -A  BTPMMAIN_S.o

Attribute Section: aeabi

File Attributes

  Tag_CPU_name: "7-A"

  Tag_CPU_arch: v7

  Tag_CPU_arch_profile: Application

  Tag_ARM_ISA_use: Yes

  Tag_THUMB_ISA_use: Thumb-2

  Tag_FP_arch: VFPv3

  Tag_Advanced_SIMD_arch: NEONv1

  Tag_ABI_PCS_wchar_t: 4

  Tag_ABI_FP_denormal: Needed

  Tag_ABI_FP_exceptions: Needed

  Tag_ABI_FP_number_model: IEEE 754

  Tag_ABI_align_needed: 8-byte

  Tag_ABI_align_preserved: 8-byte, except leaf SP

  Tag_ABI_enum_size: int

  Tag_ABI_VFP_args: VFP registers

  Tag_ABI_optimization_goals: Aggressive Speed

  Tag_CPU_unaligned_access: v6

Then I update compile parameter with -mfpu=neon and -mfloat-abi = hard to recompile BTPMSRVR_S.o, after compile success, I also check BTPMSRVR_S.o with readelf -A, result as below

nshao@TMO_Env:/nshao_repo/tmo/AM335xBluetopiaLinuxProduction-4.2.1.1.1.0/build$ readelf -A obj/BTPMSRVR_S.o

Attribute Section: aeabi

File Attributes

  Tag_CPU_name: "7-A"

  Tag_CPU_arch: v7

  Tag_CPU_arch_profile: Application

  Tag_ARM_ISA_use: Yes

  Tag_THUMB_ISA_use: Thumb-2

  Tag_FP_arch: VFPv3

  Tag_Advanced_SIMD_arch: NEONv1

  Tag_ABI_PCS_wchar_t: 4

  Tag_ABI_FP_denormal: Needed

  Tag_ABI_FP_exceptions: Needed

  Tag_ABI_FP_number_model: IEEE 754

  Tag_ABI_align_needed: 8-byte

  Tag_ABI_align_preserved: 8-byte, except leaf SP

  Tag_ABI_enum_size: int

  Tag_ABI_VFP_args: VFP registers

  Tag_ABI_optimization_goals: Aggressive Size

  Tag_CPU_unaligned_access: v6

It seems both these files use VFPv3 and VPF registers. So I don’t know why I still get link failed?

Could you please help?

  • Which host processor and tool chain are you using? The BluetopiaPM libraries are built with Linaro toolchain for Cortex-A (v7) with hard floating point option.

    Thanks

  • Hi, 

    I am running on Intel X86 CPU with Qualcomm cross compile toolchain.

    The toolchain support cortex-A7 CPU, below is supported CPU list

    arm-openwrt-linux-gcc: note: valid arguments to '-mcpu=' are: arm1020e arm1020t arm1022e arm1026ej-s arm10e arm10tdmi arm1136j-s arm1136jf-s arm1156t2-s arm1156t2f-s arm1176jz-s arm1176jzf-s arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm70 arm700 arm700i arm710 arm7100 arm710c arm710t arm720 arm720t arm740t arm7500 arm7500fe arm7d arm7di arm7dm arm7dmi arm7m arm7tdmi arm7tdmi-s arm8 arm810 arm9 arm920 arm920t arm922t arm926ej-s arm940t arm946e-s arm966e-s arm968e-s arm9e arm9tdmi cortex-a12 cortex-a15 cortex-a15.cortex-a7 cortex-a17 cortex-a17.cortex-a7 cortex-a5 cortex-a53 cortex-a57 cortex-a57.cortex-a53 cortex-a7 cortex-a72 cortex-a72.cortex-a53 cortex-a8 cortex-a9 cortex-m0 cortex-m0.small-multiply cortex-m0plus cortex-m0plus.small-multiply cortex-m1 cortex-m1.small-multiply cortex-m3 cortex-m4 cortex-m7 cortex-r4 cortex-r4f cortex-r5 cortex-r7 ep9312 exynos-m1 fa526 fa606te fa626 fa626te fa726te fmp626 generic-armv7-a iwmmxt iwmmxt2 marvell-pj4 mpcore mpcorenovfp native strongarm strongarm110 strongarm1100 strongarm1110 xgene1 xscale

    Below is supported fpu list

    arm-openwrt-linux-gcc: note: valid arguments to '-mfpu=' are: crypto-neon-fp-armv8 fp-armv8 fpv4-sp-d16 fpv5-d16 fpv5-sp-d16 neon neon-fp-armv8 neon-fp16 neon-vfpv4 vfp vfp3 vfpv3 vfpv3-d16 vfpv3-d16-fp16 vfpv3-fp16 vfpv3xd vfpv3xd-fp16 vfpv4 vfpv4-d16

    When I compile TI Bluetopia add-on, I add following compile parameter to toolschain.mak

    CFLAGS+=-mfpu=neon -O2 -fno-strict-aliasing -Os -pipe -march=armv7-a -mtune=cortex-a7 -fno-caller-saves -Wa,--noexecstack -fhonour-copts -mfloat-abi=hard -fPIC -fstack-protector --sysroot=$(TOOLCHAIN_PATH_TARGET) -I$(TOOLCHAIN_PATH_TARGET)/usr/include

    Please help how can I pass compile?

    br

    Shao nan

  • Dear

    Any update about this?

    br

    Shao nan

  • Even, though your tool chain supports ARMV7-a instruction set. how is your file system built? Is it built for same architecture version and floating point options?

    I believe, this thread is followed privately too right? 

    Thanks

  • Hi,

    What's "file system" meaning here? Do you mean my OS which use cross compiler should be compiled by ARMv7 toolschain?

    br

    Shao nan

  • I mean the target file system with glibc and other runtime libraries.

    Thanks