This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

linking floating point library from GCC into Keil (nRF52)

I'm using nRF52+SDK11.0.0+S132. I have a library compiled with GCC using flags -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 that I'm trying to link to an application being developed with Keil/uVision. I have the "Use Single Precision" option checked in uVision. I'm getting errors such as "Error: L6242E: Cannot link object file.o as its attributes are incompatible with the image attributes." Please advise on how to resolve this.

Parents
  • Hi Tosa, 

    according to the ARM Infocenter 

    Each object file generated by the compilation tools includes a set of attributes that indicate the options used to build the object and various other information. The linker checks the attributes of each object file it processes. If it finds attributes that are incompatible with the previous object files loaded the linker generates an error message of the form:

    L6242E: Cannot link object <objname> as its attributes are incompatible with the image attributes

    Hence, I think there is a mismatch between the options used when building the library and the options used to compile the other sources in Keil. I would therefore recommend taking a look at the Makefile used to build the micro-ecc library in SDK v11, which also uses the FPU. You'll find it in nRF5_SDK_11.0.0_89a8197\external\micro-ecc\nrf52_keil\armgcc.

    Best regards

    Bjørn 

Reply
  • Hi Tosa, 

    according to the ARM Infocenter 

    Each object file generated by the compilation tools includes a set of attributes that indicate the options used to build the object and various other information. The linker checks the attributes of each object file it processes. If it finds attributes that are incompatible with the previous object files loaded the linker generates an error message of the form:

    L6242E: Cannot link object <objname> as its attributes are incompatible with the image attributes

    Hence, I think there is a mismatch between the options used when building the library and the options used to compile the other sources in Keil. I would therefore recommend taking a look at the Makefile used to build the micro-ecc library in SDK v11, which also uses the FPU. You'll find it in nRF5_SDK_11.0.0_89a8197\external\micro-ecc\nrf52_keil\armgcc.

    Best regards

    Bjørn 

Children
Related