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
  • Basically, you can't just mix & match stuff from GCC with stuff from Keil - they are entirely different beasts.

    Like you can't just take any arbitrary parts for a Ford car, and expect them to just  fit and work in a Honda car.

    By fully understanding each tool chain, and carefully adjusting options to suit, an advanced user may be able to make this work...

    See this thread on the Keil forum: http://www.keil.com/forum/63912/

    Please advise on how to resolve this

    The error message tells you clearly - the attributes are incompatible; that is, they are not compatible.

    You are going to have to study both the Keil documentation and the GCC documentation in detail, discover what options are required to make it compatible - and do that!

    Alternatively:

    1. Find a suitable Keil library;
    2. Build your project using GCC instead.
Reply
  • Basically, you can't just mix & match stuff from GCC with stuff from Keil - they are entirely different beasts.

    Like you can't just take any arbitrary parts for a Ford car, and expect them to just  fit and work in a Honda car.

    By fully understanding each tool chain, and carefully adjusting options to suit, an advanced user may be able to make this work...

    See this thread on the Keil forum: http://www.keil.com/forum/63912/

    Please advise on how to resolve this

    The error message tells you clearly - the attributes are incompatible; that is, they are not compatible.

    You are going to have to study both the Keil documentation and the GCC documentation in detail, discover what options are required to make it compatible - and do that!

    Alternatively:

    1. Find a suitable Keil library;
    2. Build your project using GCC instead.
Children
No Data
Related