<?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>sscanf float</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14353/sscanf-float</link><description>Hi everyone, 
 I&amp;#39;m trying to use sscanf on my nordic device, and I get an issue with the following exemple (this same code works on my computer) 
 int d = 0;
float f = 0;
char s[] = &amp;quot;4.5 3&amp;quot;;
char str[4];

sscanf(s, &amp;quot;%f %d&amp;quot;, &amp;amp;f, &amp;amp;d);
//f = 6.5;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 25 Feb 2017 06:07:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14353/sscanf-float" /><item><title>RE: sscanf float</title><link>https://devzone.nordicsemi.com/thread/54807?ContentTypeID=1</link><pubDate>Sat, 25 Feb 2017 06:07:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0266185f-775e-4518-9527-0d176b20e324</guid><dc:creator>Johannes Lorenz</dc:creator><description>&lt;p&gt;Make sure that the heap size required to support sprintf and sscanf is set in your project. If you reduce due to memory constraints your heap size in &lt;em&gt;gcc_startup_nrfXX.s&lt;/em&gt; too much, float support will fail and your program will hang, e.g.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#ifdef __HEAP_SIZE
.....

.equ    Heap_Size, 512	/* orig value 2048 */
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sscanf float</title><link>https://devzone.nordicsemi.com/thread/54806?ContentTypeID=1</link><pubDate>Tue, 07 Jun 2016 23:40:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1c312a4-7d1c-4eeb-b26e-29dcc4f372a1</guid><dc:creator>shadowsky</dc:creator><description>&lt;p&gt;I was already using &lt;code&gt;LDFLAGS += -u_printf_float&lt;/code&gt; but not &lt;code&gt;LDFLAGS += -u_scanf_float&lt;/code&gt;. Thank you for this help :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sscanf float</title><link>https://devzone.nordicsemi.com/thread/54805?ContentTypeID=1</link><pubDate>Tue, 07 Jun 2016 12:35:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f4ade87-3dd1-4feb-8b61-87be5dbef1f4</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;If not, check &lt;a href="https://devzone.nordicsemi.com/question/64770/nrf52-and-float-printf/"&gt;this&lt;/a&gt; thread or other &lt;a href="https://devzone.nordicsemi.com/questions/sort:relevance-desc/query:printf%20float/"&gt;threads&lt;/a&gt; about the same thing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sscanf float</title><link>https://devzone.nordicsemi.com/thread/54804?ContentTypeID=1</link><pubDate>Tue, 07 Jun 2016 09:56:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cea980ca-6945-41a9-8ab8-3b6d377347d4</guid><dc:creator>shanky</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;if you are using GCC toolchain  then add this flag in makefile.&lt;/p&gt;
&lt;p&gt;LDFLAGS += -u _scanf_float&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>