<?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>How can I debug a float-point code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11049/how-can-i-debug-a-float-point-code</link><description>Hi, 
 I always see HardFault when I debug a float point code. But it can run smoothly in run-time. 
 Firstly, I use code Style-1. 
 float val
val = (int32_t)NRF_ADC-&amp;gt;RESULT;
 
 it go into HardFault directly. 
 Then I split the code into Stype-2</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 18 Jan 2016 10:48:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11049/how-can-i-debug-a-float-point-code" /><item><title>RE: How can I debug a float-point code</title><link>https://devzone.nordicsemi.com/thread/41290?ContentTypeID=1</link><pubDate>Mon, 18 Jan 2016 10:48:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:742564c3-bb90-4549-967f-bb81a9d31e18</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;nRF51 does not have FPU so your compiler is generating soft FPU instructions. What are the project settings you have for Target-&amp;gt;MicroLIB, target-&amp;gt;use Float Hardware?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I debug a float-point code</title><link>https://devzone.nordicsemi.com/thread/41289?ContentTypeID=1</link><pubDate>Mon, 28 Dec 2015 09:46:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e01df33-02e9-4a62-bb09-c55ea1e9d085</guid><dc:creator>xtting</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for your answer.&lt;/p&gt;
&lt;p&gt;Device: 51822
IDE: Keil-472
SDK Version: 10-alpha
I used soft-device.&lt;/p&gt;
&lt;p&gt;And the debugger and complier is what the SDK-10-Demo used by default, for I don&amp;#39;t so familiar about how to change config I don&amp;#39;t try to any change at all.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I debug a float-point code</title><link>https://devzone.nordicsemi.com/thread/41288?ContentTypeID=1</link><pubDate>Mon, 28 Dec 2015 09:23:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0508c24c-6038-4c1c-8236-8ccb2c6a1e8a</guid><dc:creator>monpetit</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You&amp;#39;d better show your development environments to get answers. Device name, compiler, debugger, SDK version, whether to use the SoftDevice or not, and so on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I debug a float-point code</title><link>https://devzone.nordicsemi.com/thread/41287?ContentTypeID=1</link><pubDate>Mon, 28 Dec 2015 02:47:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c06b702c-3e84-476f-ae23-1034bbb1d7fa</guid><dc:creator>xtting</dc:creator><description>&lt;p&gt;I guess may the debugger has something wrong when call the float point liburay, but how can I config the Keil-472 correctly? I used the official Demo code to develop my project, without any config changed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>