<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>linking floating point library from GCC into Keil (nRF52)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39321/linking-floating-point-library-from-gcc-into-keil-nrf52</link><description>I&amp;#39;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&amp;#39;m trying to link to an application being developed with Keil/uVision. I have the &amp;quot;Use Single Precision&amp;quot; option checked</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 May 2019 14:59:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39321/linking-floating-point-library-from-gcc-into-keil-nrf52" /><item><title>RE: linking floating point library from GCC into Keil (nRF52)</title><link>https://devzone.nordicsemi.com/thread/188012?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 14:59:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7fd5eca-39d3-4c27-8c56-a33bbf9a4a50</guid><dc:creator>Tosa</dc:creator><description>&lt;p&gt;In case it helps someone, GCC defaults to --wchar32 and Keil defaults to --wchar16, hence&amp;nbsp;my link error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: linking floating point library from GCC into Keil (nRF52)</title><link>https://devzone.nordicsemi.com/thread/152327?ContentTypeID=1</link><pubDate>Wed, 10 Oct 2018 10:05:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7efec90e-9d81-4159-8b70-a9251de7cb48</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Basically, you can&amp;#39;t just mix &amp;amp; match stuff from GCC with stuff from Keil - they are entirely different beasts.&lt;/p&gt;
&lt;p&gt;Like you can&amp;#39;t just take any arbitrary parts for a Ford car, and expect them to just&amp;nbsp; fit and work in a Honda car.&lt;/p&gt;
&lt;p&gt;By fully understanding each tool chain, and carefully adjusting options to suit, an advanced user &lt;em&gt;may&lt;/em&gt; be able to make this work...&lt;/p&gt;
&lt;p&gt;See this thread on the Keil forum:&amp;nbsp;&lt;a href="http://www.keil.com/forum/63912/"&gt;http://www.keil.com/forum/63912/&lt;/a&gt;&lt;/p&gt;
[quote userid="15022" url="~/f/nordic-q-a/39321/linking-floating-point-library-from-gcc-into-keil-nrf52"]Please advise on how to resolve this[/quote]
&lt;p&gt;The error message tells you clearly - the attributes are &lt;em&gt;&lt;strong&gt;incompatible&lt;/strong&gt;&lt;/em&gt;; that is, they are &lt;em&gt;&lt;strong&gt;not&lt;/strong&gt; &lt;/em&gt;compatible.&lt;/p&gt;
&lt;p&gt;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!&lt;/p&gt;
&lt;p&gt;Alternatively:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Find a suitable Keil library;&lt;/li&gt;
&lt;li&gt;Build your project using GCC instead.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: linking floating point library from GCC into Keil (nRF52)</title><link>https://devzone.nordicsemi.com/thread/152321?ContentTypeID=1</link><pubDate>Wed, 10 Oct 2018 09:39:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:377c3411-ab6c-4b8c-9972-d38347a902a0</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Tosa,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;according to the ARM Infocenter&amp;nbsp;&lt;/p&gt;
&lt;p&gt;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&amp;nbsp;loaded&amp;nbsp;the linker&amp;nbsp;generates an error message of the form:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;L6242E: Cannot link object &amp;lt;objname&amp;gt; as its attributes are incompatible with the image attributes&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;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&amp;#39;ll find it in&amp;nbsp;nRF5_SDK_11.0.0_89a8197\external\micro-ecc\nrf52_keil\armgcc.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Bjørn&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>