<?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>From Where Is sprintf Being Loaded?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22803/from-where-is-sprintf-being-loaded</link><description>Hello, 
 I am successfully using the following code: 
 float f = 23.50
char buffer[10];
sprintf(buffer, &amp;quot;Float = %f\n&amp;quot;, f);
SEGGER_RTT_WriteString(0, buffer);
 
 I have two questions: 
 
 
 From where is the sprint function being loaded? My</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Jun 2017 21:22:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22803/from-where-is-sprintf-being-loaded" /><item><title>RE: From Where Is sprintf Being Loaded?</title><link>https://devzone.nordicsemi.com/thread/89641?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 21:22:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57dec50a-0dca-425e-80fc-cf9bd0ef29be</guid><dc:creator>rvaessen</dc:creator><description>&lt;p&gt;Thx, Carlos&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: From Where Is sprintf Being Loaded?</title><link>https://devzone.nordicsemi.com/thread/89640?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 21:22:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c21bb7fb-a27b-40b4-891e-80921532fd2e</guid><dc:creator>rvaessen</dc:creator><description>&lt;p&gt;Several stdio.h files in the Kiel and GNU Arm install locations. Also, lots of libraries; sprintf is probably in there somewhere.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: From Where Is sprintf Being Loaded?</title><link>https://devzone.nordicsemi.com/thread/89639?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 21:22:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59729ea9-82ed-48f4-a2b4-964486a61258</guid><dc:creator>Carlos</dc:creator><description>&lt;p&gt;stdio.h is part of the C standard, it&amp;#39;s included on Keil not in the Nordic SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: From Where Is sprintf Being Loaded?</title><link>https://devzone.nordicsemi.com/thread/89638?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 21:09:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e52295e7-c440-4a2a-a310-54b74018a258</guid><dc:creator>rvaessen</dc:creator><description>&lt;p&gt;Thx, Carlos. That worked. However, I still do not understand from where sprintf and stdio.h are being resolved. I searched the entire Nordic sdk subhierarchy; no stdio.h. Are there a Windows standard c library and a Windows system header search location that Kiel is accessing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: From Where Is sprintf Being Loaded?</title><link>https://devzone.nordicsemi.com/thread/89636?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 21:01:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db749e52-f383-440f-b09a-665627a610ea</guid><dc:creator>rvaessen</dc:creator><description>&lt;p&gt;Thx Turbo.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: From Where Is sprintf Being Loaded?</title><link>https://devzone.nordicsemi.com/thread/89635?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 00:58:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a586a2d-104d-4ff9-9e4f-87114e055b90</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;You should fix that buffer overflow.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: From Where Is sprintf Being Loaded?</title><link>https://devzone.nordicsemi.com/thread/89637?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 00:26:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0015bb1-56f5-4a9c-a49a-68b7a9b14f6d</guid><dc:creator>Carlos</dc:creator><description>&lt;p&gt;Hi,
sprintf function resides on the stdio header file, so to fix your warning you should include that header file like so:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;in the file where are you using the sprintf function.
For more info you can check [1].&lt;/p&gt;
&lt;p&gt;Hope it helps.&lt;/p&gt;
&lt;p&gt;[1] &lt;a href="https://www.tutorialspoint.com/c_standard_library/c_function_sprintf.htm"&gt;www.tutorialspoint.com/.../c_function_sprintf.htm&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>