<?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>nrf51822 + gdb + printf</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44444/nrf51822-gdb-printf</link><description>Hello everyone, 
 I&amp;#39;m trying to set up entirely open source project for my NRF51822 chip. Everything works fine so far but something strange happens during debugging. 
 I use nRF5_SDK_11.0.0_89a8197 and I&amp;#39;ve taken a template with a softdevice. I&amp;#39;m flashing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Mar 2019 09:46:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44444/nrf51822-gdb-printf" /><item><title>RE: nrf51822 + gdb + printf</title><link>https://devzone.nordicsemi.com/thread/175272?ContentTypeID=1</link><pubDate>Mon, 11 Mar 2019 09:46:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:849096b9-bc00-4d1d-b68a-abb498d837da</guid><dc:creator>L.B.</dc:creator><description>&lt;p&gt;YESSS! I&amp;#39;ve included -DDEBUG as you said and then the printf would go into the function app_error_save_and_stop( ) and hang. I followed the comments in it - &lt;/p&gt;
&lt;p&gt;// If printing is disrupted, remove the irq calls, or set the loop variable to 0 in the debugger.&lt;/p&gt;
&lt;p&gt;and changed (at compile time, not with the debugger)&lt;/p&gt;
&lt;p&gt;volatile bool loop = true; ------&amp;gt; to ------&amp;gt; volatile bool loop = false;&lt;/p&gt;
&lt;p&gt;in that same function and yay - it works now!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the help!&lt;/p&gt;
&lt;p&gt;Really appreciate it!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 + gdb + printf</title><link>https://devzone.nordicsemi.com/thread/175012?ContentTypeID=1</link><pubDate>Fri, 08 Mar 2019 13:02:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:831bb6b8-2b78-4830-8b8e-49f4532e6d1a</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Try to set the DEBUG preprocessor symbol and run the code again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 + gdb + printf</title><link>https://devzone.nordicsemi.com/thread/174965?ContentTypeID=1</link><pubDate>Fri, 08 Mar 2019 08:58:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95bac397-e235-48da-a8af-28fe3155a209</guid><dc:creator>L.B.</dc:creator><description>&lt;p&gt;Unfortunately it still resets but this time stops at the line when I was previously on. I can&amp;#39;t even explain this behahiour :-D&amp;nbsp; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 + gdb + printf</title><link>https://devzone.nordicsemi.com/thread/174858?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2019 15:32:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b3c6a0f-f53f-4dbb-aa74-cdf472c84f6e</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hey, try removing all the breakpoints and see if it still resets.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 + gdb + printf</title><link>https://devzone.nordicsemi.com/thread/174648?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2019 17:56:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2423d6bd-288b-43b6-ac1d-ec3fea7327a9</guid><dc:creator>L.B.</dc:creator><description>&lt;p&gt;Our team has found that commenting out the ble_advertising_start() function will make the printf operate correctly, so we assume that this is due to the softdevice that interrupts the current main context. And we have no debugging info for it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But we are not 100% sure if this is the cause...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>