<?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>Using FPU of nrf 52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21440/using-fpu-of-nrf-52</link><description>hello,
I am using Keil&amp;#39;s uVision 5 v 5.22.
Please tell me how to enable FPU.
thank you,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Apr 2017 15:16:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21440/using-fpu-of-nrf-52" /><item><title>RE: Using FPU of nrf 52</title><link>https://devzone.nordicsemi.com/thread/84103?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2017 15:16:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b0e48d2-bdf2-4b70-99ac-f790007d5248</guid><dc:creator>jcormier</dc:creator><description>&lt;p&gt;Thanks, will check it out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using FPU of nrf 52</title><link>https://devzone.nordicsemi.com/thread/84104?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2017 14:42:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8ef76e1-3c14-4a62-a4cf-415ca0794541</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Yes, you have the linker flag called &lt;code&gt;LDFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16&lt;/code&gt;, and CFLAG &lt;code&gt;CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16&lt;/code&gt; and also might need to add these ARM_MATH_CM4 flags:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;CFLAGS += -DARM_MATH_CM4
ASMFLAGS += -DARM_MATH_CM4
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Take look at e.g. the makefile for the example, located in the folder &lt;code&gt;SDK_folder\examples\peripheral\fpu_fft\pca10040\blank\armgcc\&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using FPU of nrf 52</title><link>https://devzone.nordicsemi.com/thread/84105?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2017 14:35:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b728f181-5a86-4b76-b91e-0842a4df113a</guid><dc:creator>jcormier</dc:creator><description>&lt;p&gt;Sigurd, Does this &amp;quot;Use single precision&amp;quot; option have a similar option for building with GCC?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using FPU of nrf 52</title><link>https://devzone.nordicsemi.com/thread/84102?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2017 14:31:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aed69941-86da-4207-b907-0c5442aa7af5</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is a &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.2.0/fpu_fft_example.html?cp=4_0_1_4_5_10"&gt;FPU example&lt;/a&gt; in the SDK. It&amp;#39;s located in the folder&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;SDK_InstallFolder&amp;gt;\examples\peripheral\fpu_fft
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In Keil the Floating Point Hardware option must be set to &amp;quot;Use Single Precision&amp;quot;:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/FPU.png" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>