<?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>printf output is not displayed during debug</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36044/printf-output-is-not-displayed-during-debug</link><description>Dear Support, 
 I’m working on uVision V5.25.2.0, using nRF5_SDK_15.0.0_a53641a. 
 My evaluation board is Rigado BMD-300. 
 Target: nrf52832_xxaa. 
 I tried using the printf function while debugging, but its output is not displayed. I tested it in a few</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 15 Jul 2018 15:06:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36044/printf-output-is-not-displayed-during-debug" /><item><title>RE: printf output is not displayed during debug</title><link>https://devzone.nordicsemi.com/thread/140136?ContentTypeID=1</link><pubDate>Sun, 15 Jul 2018 15:06:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4d7495b-d9b0-4c72-81af-3edb18c06629</guid><dc:creator>Arie</dc:creator><description>&lt;p&gt;After I haven&amp;rsquo;t found a solution in Google and didn&amp;rsquo;t receive an answer neither from the ARM nor from the Nordic support, I myself solved the problem, as follows:&lt;/p&gt;
&lt;p&gt;In addition to &lt;a title="known configuration" href="http://www.keil.com/support/man/docs/uv4/uv4_db_dbg_printf_viewer.htm" rel="noopener noreferrer" target="_blank"&gt;known configuration&lt;/a&gt;, you must configure the TRACECONFIG register in your code:&lt;pre class="ui-code" data-mode="text"&gt;		NRF_CLOCK-&amp;gt;TRACECONFIG = (CLOCK_TRACECONFIG_TRACEMUX_Parallel &amp;lt;&amp;lt; CLOCK_TRACECONFIG_TRACEMUX_Pos) |
		(CLOCK_TRACECONFIG_TRACEPORTSPEED_32MHz &amp;lt;&amp;lt; CLOCK_TRACECONFIG_TRACEPORTSPEED_Pos); &lt;/pre&gt;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf output is not displayed during debug</title><link>https://devzone.nordicsemi.com/thread/138959?ContentTypeID=1</link><pubDate>Wed, 04 Jul 2018 12:26:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e35dbd7-cc7a-4302-816b-030d69dd1e79</guid><dc:creator>Arie</dc:creator><description>&lt;p&gt;Agree. Thanks very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf output is not displayed during debug</title><link>https://devzone.nordicsemi.com/thread/138951?ContentTypeID=1</link><pubDate>Wed, 04 Jul 2018 12:09:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad90cbb5-51b2-4824-ba8d-d44b9cc5137b</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;native printf are never easy thing to support PC standard I/O for embedded solutions. They always remain tricky since embedded solutions does not have conventional IO capabilities. Neither do they have display. Hence all the prints needed to be rerouted from standard out to serial ports or debug ports.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf output is not displayed during debug</title><link>https://devzone.nordicsemi.com/thread/138943?ContentTypeID=1</link><pubDate>Wed, 04 Jul 2018 11:48:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebc0aa21-d0c7-4a80-8833-e1288ae80725</guid><dc:creator>Arie</dc:creator><description>&lt;p&gt;Thanks Aryan. I know this post and tried configuring the Trace before applying to support. This doesn&amp;rsquo;t work.&lt;/p&gt;
&lt;p&gt;Surely, I can get output another way (and got it through the SEGGER J-Link RTT viewer), but I believe that such basic function as printf using &lt;strong&gt;native&lt;/strong&gt; IDE should work (e.g. as in Code Composer Studio of TI).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf output is not displayed during debug</title><link>https://devzone.nordicsemi.com/thread/138898?ContentTypeID=1</link><pubDate>Wed, 04 Jul 2018 08:00:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7a0aa1e-639e-4827-8074-445065af4266</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You need to configure, the Trace port to be able to do that, I think. You can follow &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/21622/nrf52-and-keil-debug-printf-viewer"&gt;this &lt;/a&gt;post if you want to try it.&lt;/p&gt;
&lt;p&gt;I do not see why you cannot use retarget.c file and redirect the log to the uart com port. It really simple to do.&amp;nbsp;It is really really small benefit of getting the logs to Keil Debug (printf) viewer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf output is not displayed during debug</title><link>https://devzone.nordicsemi.com/thread/138853?ContentTypeID=1</link><pubDate>Tue, 03 Jul 2018 19:59:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30769b14-ebb0-4abd-8929-525a935a1e57</guid><dc:creator>Arie</dc:creator><description>&lt;p&gt;I use it in J-LINK/ J-Trace Cortex mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf output is not displayed during debug</title><link>https://devzone.nordicsemi.com/thread/138851?ContentTypeID=1</link><pubDate>Tue, 03 Jul 2018 19:53:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb878f8f-8e1b-48d6-a401-9612b3673cd6</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Are you running this in simulator mode? if not, printf executing on nrf chip will not show you anything on the Keil console as far as i know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf output is not displayed during debug</title><link>https://devzone.nordicsemi.com/thread/138849?ContentTypeID=1</link><pubDate>Tue, 03 Jul 2018 19:47:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fa2f1ce-2597-4b88-8223-4fbbfb7241dd</guid><dc:creator>Arie</dc:creator><description>&lt;p&gt;Thanks. I removed it, but this didn&amp;#39;t help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf output is not displayed during debug</title><link>https://devzone.nordicsemi.com/thread/138843?ContentTypeID=1</link><pubDate>Tue, 03 Jul 2018 19:28:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:220d0617-a185-4ee7-8da7-b32eb1c2b40d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;if you have retarget.c file in your project, you need to remove it, as it is overwriting the functions that printf uses to redirect the logs from standard output to uart.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf output is not displayed during debug</title><link>https://devzone.nordicsemi.com/thread/138841?ContentTypeID=1</link><pubDate>Tue, 03 Jul 2018 19:17:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d097e428-7c7d-45d4-b26c-28026098aa41</guid><dc:creator>Arie</dc:creator><description>&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;I took the uart project as an example. I&amp;rsquo;m not interested specifically in uart or any other peripherals.&lt;/p&gt;
&lt;p&gt;I just want my message, e.g. printf(&amp;quot;Hello world!\r\n&amp;quot;);&amp;nbsp;to be displayed in the Debug (printf) Viewer of the uVision.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf output is not displayed during debug</title><link>https://devzone.nordicsemi.com/thread/138828?ContentTypeID=1</link><pubDate>Tue, 03 Jul 2018 18:01:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db29a681-528c-41ea-9eae-6489f8446c3a</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The UART pin mapping in the SDK are mapped to a particular DK as per the project. I am not how the mapping of UART pins are done from your&amp;nbsp;Rigado BMD-300 module onto the custom board. Look into the code of UART initialization in your project and check that the UART pin number matches the UART pin on your board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>