<?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>Command line tracing in Ubuntu</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12766/command-line-tracing-in-ubuntu</link><description>Hi again. 
 I&amp;#39;m using nRF52 DK board in Ubuntu. I can flash the device with the blinky example (I haven&amp;#39;t yet tried the softdevice tough), but I cannot really get any traces out of the SW. I added simple printf to blinky main loop to keep things simple</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 31 Mar 2016 12:57:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12766/command-line-tracing-in-ubuntu" /><item><title>RE: Command line tracing in Ubuntu</title><link>https://devzone.nordicsemi.com/thread/48494?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2016 12:57:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14af82eb-749f-49b1-a74a-5b4467f468c6</guid><dc:creator>Matts</dc:creator><description>&lt;p&gt;Now it works.
const app_uart_comm_params_t comm_params =
{
RX_PIN_NUMBER,
TX_PIN_NUMBER,
RTS_PIN_NUMBER,
CTS_PIN_NUMBER,
APP_UART_FLOW_CONTROL_ENABLED,
false,
UART_BAUDRATE_BAUDRATE_Baud115200
};&lt;/p&gt;
&lt;p&gt;And the main thing was to change the tx buffer size in the file to 2k. apparently the whole system outputs so much trace that it overflows.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Command line tracing in Ubuntu</title><link>https://devzone.nordicsemi.com/thread/48493?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2016 12:42:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99f98f53-cb3d-415e-9a5b-5cb6b74e1709</guid><dc:creator>Matts</dc:creator><description>&lt;p&gt;To continue my monolog:&lt;/p&gt;
&lt;p&gt;I managed to get some life out of the tracing (altough still not working properly).&lt;/p&gt;
&lt;p&gt;By adding few makefile flags:
CFLAGS += -DBSP_UART_SUPPORT
CFLAGS += -DENABLE_DEBUG_LOG_SUPPORT (originally I just removed the #ifdef from the app_trace.h &amp;amp; c)&lt;/p&gt;
&lt;p&gt;Also
-replaced uart_app.c with uart_app_fifo.c
-added INC_PATHS  += -I../config/uart_pca10036
-added INC_PATHS += -I../components/libraries/uart&lt;/p&gt;
&lt;p&gt;After this I get trace calls from main loop (this is trace &amp;amp; debugger modified version of ble alert notification example) with 2,5 sec delay:
for (;;) {
printf(&amp;quot;\n looping\n\r&amp;quot;);
nrf_delay_ms(2500);
power_manage();
}&lt;/p&gt;
&lt;p&gt;And in terminal:
looping
looping
looping&lt;/p&gt;
&lt;p&gt;However if button is pressed (i added only extra traces there) it all goes bad:&lt;/p&gt;
&lt;p&gt;&amp;quot;        ����&amp;quot;&lt;/p&gt;
&lt;p&gt;Is this some stack overflow in the cb?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Command line tracing in Ubuntu</title><link>https://devzone.nordicsemi.com/thread/48492?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2016 11:39:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3f5d64d-a70a-4699-8c75-adc62f591089</guid><dc:creator>Matts</dc:creator><description>&lt;p&gt;Ok, lets reform the question.&lt;/p&gt;
&lt;p&gt;What is the easiest way to try the tracing under linux? I noticed, that there&amp;#39;s pretty much no printf:s in other examples than the uart.&lt;/p&gt;
&lt;p&gt;I managed to get uart traces out (only to terminal, not via any j-link related tool) from putty-example by adding uart config to example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;const app_uart_comm_params_t comm_params =
{
  RX_PIN_NUMBER,
  TX_PIN_NUMBER,
  RTS_PIN_NUMBER,
  CTS_PIN_NUMBER,
  APP_UART_FLOW_CONTROL_ENABLED,
  false,
  UART_BAUDRATE_BAUDRATE_Baud38400
};
 // Initialize.

APP_UART_FIFO_INIT(&amp;amp;comm_params,
                 UART_RX_BUF_SIZE,
                 UART_TX_BUF_SIZE,
                 uart_error_handle,
                 APP_IRQ_PRIORITY_LOW,
                 err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However when I tried this with any soft device example, no trace is outputted properly (some random characters appear to terminal occasionally). The app_trace_init seems to do same thign with higher bus clock, but that&amp;#39;s it.&lt;/p&gt;
&lt;p&gt;Is there something in the softdevice that re-routes the uart output? Or is this matter of some makefile setting?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>