<?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>floating point issue with softfp and nRF52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40559/floating-point-issue-with-softfp-and-nrf52840</link><description>I am trying to get a driver from a third party binary to work. Their library was compiled without using the HW FPU. I had to compile my code to use the softfp. I also added the _printf_float option. I am running on a RF52840, GCC, Eclipse, Windows, on</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 20 Nov 2018 17:48:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40559/floating-point-issue-with-softfp-and-nrf52840" /><item><title>RE: floating point issue with softfp and nRF52840</title><link>https://devzone.nordicsemi.com/thread/158262?ContentTypeID=1</link><pubDate>Tue, 20 Nov 2018 17:48:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:189a544c-dd5a-4d40-b525-194e97a2f6f5</guid><dc:creator>Steve</dc:creator><description>&lt;p&gt;Any casting doing floating point math will cause the crash.&amp;nbsp; The problem has do to with the software floating point unit.&amp;nbsp; &amp;nbsp;Either something wrong with how I used it or the softfpu itself.&amp;nbsp; I was able to get the other vendor to compile their library with the hardware FPU on.&amp;nbsp; I recompiled with HW FPU and it solved the problem.&amp;nbsp; I have never had an issue using the HW FPU.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: floating point issue with softfp and nRF52840</title><link>https://devzone.nordicsemi.com/thread/157885?ContentTypeID=1</link><pubDate>Mon, 19 Nov 2018 09:03:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bc87da6-e309-4fee-b913-d69a73d365b8</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Could you post more of the code in the routine that is failing?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: floating point issue with softfp and nRF52840</title><link>https://devzone.nordicsemi.com/thread/157788?ContentTypeID=1</link><pubDate>Fri, 16 Nov 2018 17:09:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70e830ac-b01b-4c12-a18c-a891fb8d589b</guid><dc:creator>Steve</dc:creator><description>&lt;p&gt;HardFault when trying to execute the&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;span&gt;tempInt = (unsigned int)&amp;nbsp; (power_bins_data[i] + 0.5);&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: floating point issue with softfp and nRF52840</title><link>https://devzone.nordicsemi.com/thread/157746?ContentTypeID=1</link><pubDate>Fri, 16 Nov 2018 13:59:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b6f5091-0729-4c02-a45f-40d51337a98c</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;How to properly post source code:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/8203._5F00_Insert-Code-_2D00_-Nordic.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: floating point issue with softfp and nRF52840</title><link>https://devzone.nordicsemi.com/thread/157728?ContentTypeID=1</link><pubDate>Fri, 16 Nov 2018 13:23:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bba1026e-3224-4dea-ae01-2081cdd8cabd</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Steve,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What is the issue you&amp;#39;re getting? HardFault, linker error, or does the printing just give you the incorrect value?&lt;/p&gt;
&lt;p&gt;Just to confirm:&amp;nbsp;&lt;span&gt;-u _printf_float was appended to LDFLAGS?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&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;Håkon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>