<?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>Program cacthes breakpoint and then freezes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6225/program-cacthes-breakpoint-and-then-freezes</link><description>I have just started with nRF51 DK using Keil uVision and encountered a strange problem. I compiled and loaded a ble_app_hrs example, I can see it working fine (the LED flashes every 2 seconds or so). I want to debug the example to see the flow of the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 Apr 2015 00:51:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6225/program-cacthes-breakpoint-and-then-freezes" /><item><title>RE: Program cacthes breakpoint and then freezes</title><link>https://devzone.nordicsemi.com/thread/21801?ContentTypeID=1</link><pubDate>Wed, 01 Apr 2015 00:51:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb8bb62f-139e-49f2-b420-ca4414ad8421</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Note for anyone searching for RTT information. The latest Crossworks (3.4) needs you to set &amp;quot;Startup Completion Point&amp;quot; to &amp;#39;main&amp;#39; in order for the RTT system to be properly started and get trace information. I&amp;#39;m told there was a race condition in the previous code which could cause RTT to try and initialize in the debugger before the code actually got to the point of setting up the buffer, so RTT initialization was deferred to this fixed &amp;#39;Startup Completion Point&amp;#39;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program cacthes breakpoint and then freezes</title><link>https://devzone.nordicsemi.com/thread/21800?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2015 12:39:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43b4aa4a-6f86-493f-9d50-06a4abc1df05</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;When you do - send me a private message - I wrote a plugin for crossworks which sets up projects with all the right flags for softdevice / no softdevice / different boards etc. I&amp;#39;ve found it rather useful and can send it to you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program cacthes breakpoint and then freezes</title><link>https://devzone.nordicsemi.com/thread/21799?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2015 12:37:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28facfee-a29c-4adc-bd0b-e77a6dfabaa8</guid><dc:creator>Bill Siever</dc:creator><description>&lt;p&gt;Thanks for the update.  I hope to transition to Crossworks and I&amp;#39;m happy to hear that it will play well with RTT.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program cacthes breakpoint and then freezes</title><link>https://devzone.nordicsemi.com/thread/21798?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2015 23:53:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:decdd4e1-8c75-44f5-a0f8-d62ce5e49ef8</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Yeah I&amp;#39;ll try their log view - have to work out how to do that on OSX, don&amp;#39;t think they provide a GUI app, just a socket you can connect to. Although again I wonder how that will play with having another client - i.e. Crossworks, already trying to get the messages. Certainly I stop seeing messages when the softdevice is active, but I&amp;#39;ll write a simple project and try to break it down a bit.&lt;/p&gt;
&lt;p&gt;Throughput can be an issue, I&amp;#39;ve swamped the buffer (in non=softdevice mode), it&amp;#39;s a ring buffer and eventually you overwrite yourself.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;UPDATE&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Ok I debugged my way through the code to find my problem using RTT with the softdevice was entirely of my own making, it just so happened the RTT buffer was in-memory next to a buffer of my own and I was overwriting it by one byte, breaking the structure.&lt;/p&gt;
&lt;p&gt;So RTT now seems to be working ok with the softdevice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program cacthes breakpoint and then freezes</title><link>https://devzone.nordicsemi.com/thread/21797?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2015 23:45:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4519d27-5bd1-4ea6-9047-dc7ce5b4f68b</guid><dc:creator>Bill Siever</dc:creator><description>&lt;p&gt;I&amp;#39;ve just used RTT to get a better sense of the sequence of events when doing BLE transactions and to identify some tricky errors.  It has generally worked well for me when logging a few small messages (while using the softdevice). I use Segger&amp;#39;s log viewer to see the message.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve wondered if there might be some throughput problems when doing more exhaustive logging.  I&amp;#39;ve also wondered if it&amp;#39;s sensitive to the buffer size.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program cacthes breakpoint and then freezes</title><link>https://devzone.nordicsemi.com/thread/21796?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2015 23:33:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07c258d7-6ae9-40c5-b80d-83f2cbccf325</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;I&amp;#39;ve been finding that the RTT works fine before the softdevice is enabled but after that I don&amp;#39;t get see any output from it at all. I haven&amp;#39;t started investigating much yet but wondered if anyone else had seen anything similar.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using Crossworks, so it might be an issue with their implementation of RTT, it&amp;#39;s built right-in to the IDE and messages just appear in the console log, which is useful.&lt;/p&gt;
&lt;p&gt;Anyone else seen any issues using this with the softdevice? I suspect I&amp;#39;m just going to have to dig in and see if I can work out what&amp;#39;s happening.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program cacthes breakpoint and then freezes</title><link>https://devzone.nordicsemi.com/thread/21795?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2015 23:26:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32c38338-f13a-48a3-b603-400ddb972e06</guid><dc:creator>Bill Siever</dc:creator><description>&lt;p&gt;The Segger J-Link tools support a &amp;quot;Real-Time Terminal&amp;quot; (RTT), which is a good tool for logging the flow of the program.  It can be used to do all logging via the programmer rather than a UART.&lt;/p&gt;
&lt;p&gt;Segger&amp;#39;s RTT has been mentioned in some previous forum posts:&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/question/23763/j-link-rtt-for-easy-debug-prints/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;
and:
&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;I also have a blog post that shows how I configure and use it: &lt;a href="http://siever.info/blog/?p=1"&gt;http://siever.info/blog/?p=1&lt;/a&gt;
(It&amp;#39;s pretty easy to install/use as-is, but I created a Keil v5 package that may make it slightly easier. The package is available from my blog if anyone is interested)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program cacthes breakpoint and then freezes</title><link>https://devzone.nordicsemi.com/thread/21792?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2015 15:10:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acaec521-6d13-4ea5-a18b-826e872d2cf2</guid><dc:creator>Vebj&amp;#248;rn</dc:creator><description>&lt;p&gt;I am currently writing a short tutorial on how to use RTT to debug timing-sensitive applications, it will be available soon. In the meantime, you can read more about here: &lt;a href="https://www.segger.com/jlink-real-time-terminal.html"&gt;www.segger.com/jlink-real-time-terminal.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program cacthes breakpoint and then freezes</title><link>https://devzone.nordicsemi.com/thread/21794?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2015 14:16:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5093a3fb-7f4f-4d6b-8768-95315772ec0f</guid><dc:creator>jkwintal</dc:creator><description>&lt;p&gt;Thanks for the answer. I&amp;#39;m just starting with nRFs and BLE, as you can see. It was probably a silly question to ask, but... ;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program cacthes breakpoint and then freezes</title><link>https://devzone.nordicsemi.com/thread/21793?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2015 14:13:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4626ff2a-6e1f-4cde-ab7d-268ebdff59c4</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;you can&amp;#39;t debug things which use the softdevice and resume again. That throws the BTLE timing, which is very accurate, off, whilst you are stopped in the debugger and the softdevice then fails (usually ends up in the hardfault handler).&lt;/p&gt;
&lt;p&gt;You can use other techniques, like logging to a serial port, you can stop ONE time and examine where you are, but if you resume in something using the softdevice you&amp;#39;ll crash. The softdevice needs to run uninterrupted.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>