<?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>Variadic functions</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7026/variadic-functions</link><description>Is there any construction available in the SDK, to achieve printing functions, with an undefined number of parameters ? The classic example : 
 #ifdef CONFIG_DEBUG
#define DBG_PRINT(...) printf(__VA_ARGS__)
#else
#define DBG_PRINT(...) {}
#endif</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Jun 2015 13:13:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7026/variadic-functions" /><item><title>RE: Variadic functions</title><link>https://devzone.nordicsemi.com/thread/24800?ContentTypeID=1</link><pubDate>Tue, 23 Jun 2015 13:13:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d065c8b-8be5-4717-89ca-b694e69732d7</guid><dc:creator>Bill Siever</dc:creator><description>&lt;p&gt;I think Vebjørn&amp;#39;s Tutorial may be the best starting point for RTT &amp;amp; nRF: &lt;a href="https://devzone.nordicsemi.com/tutorials/6/debugging-with-real-time-terminal/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt; (It includes updates to the library functions in redirect.c mentioned by Pektusin below)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Variadic functions</title><link>https://devzone.nordicsemi.com/thread/24799?ContentTypeID=1</link><pubDate>Tue, 23 Jun 2015 12:23:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ea52c19-b178-4d9a-9413-c7c9360880ca</guid><dc:creator>Jean-Louis Bonnaff&amp;#233;</dc:creator><description>&lt;p&gt;+1 for JLink RTT. Also enables printing without disturbing bluetooth operations !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Variadic functions</title><link>https://devzone.nordicsemi.com/thread/24798?ContentTypeID=1</link><pubDate>Wed, 13 May 2015 02:06:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cedcf5e-bfa3-422a-b1f6-98d295e127bf</guid><dc:creator>Bill Siever</dc:creator><description>&lt;p&gt;If you just want to use printing for debugging purposes you might consider using Segger&amp;#39;s Real-Time-Terminal (RTT).&lt;/p&gt;
&lt;p&gt;There are already a few other forum posts that can point you in the right direction:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/23763/j-link-rtt-for-easy-debug-prints/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/29430/debugging-without-disconnect/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And you can search for RTT for others.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Variadic functions</title><link>https://devzone.nordicsemi.com/thread/24797?ContentTypeID=1</link><pubDate>Tue, 12 May 2015 23:42:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de12d1da-2681-498c-8875-ce63a86e6f3d</guid><dc:creator>Pektusin</dc:creator><description>&lt;p&gt;For the gcc and libc, you have to implement int _write(int file, char *ptr, int len) function that writes your print data to the device of your choice (memory, uart etc). SDK provides an example of redirecting to UART, search for redirect.c.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>