<?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>Debugging application by jumping in time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43666/debugging-application-by-jumping-in-time</link><description>Hi guys, 
 my app crashes exactly every 8 minutes. 
 I have some bug in my code and would want to find what the reason is. 
 Is it possible to change the internal register value of app timer so it starts on 7m and 30s? 
 i have looked at the app_timer_cnt_get</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Feb 2019 14:12:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43666/debugging-application-by-jumping-in-time" /><item><title>RE: Debugging application by jumping in time</title><link>https://devzone.nordicsemi.com/thread/170920?ContentTypeID=1</link><pubDate>Wed, 13 Feb 2019 14:12:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dad2af83-6427-417c-9844-d01d4e2c5712</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Yes - That kind of thing.&lt;/p&gt;
&lt;p&gt;As I said initially, it can be as simple as just dropping bytes into a ring buffer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging application by jumping in time</title><link>https://devzone.nordicsemi.com/thread/170916?ContentTypeID=1</link><pubDate>Wed, 13 Feb 2019 14:04:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d34ecfe3-b0cb-46fb-8f6b-e8d00a93073b</guid><dc:creator>schef</dc:creator><description>&lt;p&gt;Aha some kind of profiler. I have found something like this: &lt;a href="https://mcuoneclipse.com/2015/04/04/poor-mans-trace-free-of-charge-function-entryexit-trace-with-gnu-tools/"&gt;https://mcuoneclipse.com/2015/04/04/poor-mans-trace-free-of-charge-function-entryexit-trace-with-gnu-tools/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Another idea that came to me was to write a script which would generate gdb code which would write enter and exit of functions which would then be written to a file. And then use a external tool to examine this data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging application by jumping in time</title><link>https://devzone.nordicsemi.com/thread/170913?ContentTypeID=1</link><pubDate>Wed, 13 Feb 2019 13:57:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa412771-5105-41ad-a067-d7014ba89938</guid><dc:creator>awneil</dc:creator><description>[quote userid="15419" url="~/f/nordic-q-a/43666/debugging-application-by-jumping-in-time/170899"]What do you mean by &amp;quot;breadcrumbs&amp;quot;?[/quote]
&lt;p&gt;This kind of thing:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.sentry.io/2016/05/04/breadcrumbs"&gt;https://blog.sentry.io/2016/05/04/breadcrumbs&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging application by jumping in time</title><link>https://devzone.nordicsemi.com/thread/170899?ContentTypeID=1</link><pubDate>Wed, 13 Feb 2019 13:37:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c781ef00-00b8-4554-8610-b22d174fd2bd</guid><dc:creator>schef</dc:creator><description>&lt;p&gt;I found the problem using trial and error. When the app timer overflowed i made a recursive call.&lt;/p&gt;
&lt;p&gt;Is is possible to see the stack size using gdb?&lt;/p&gt;
&lt;p&gt;What do you mean by &amp;quot;breadcrumbs&amp;quot;?&lt;/p&gt;
&lt;p&gt;Thanks for the ideas.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging application by jumping in time</title><link>https://devzone.nordicsemi.com/thread/170888?ContentTypeID=1</link><pubDate>Wed, 13 Feb 2019 13:10:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce54ca57-ee2d-4191-8a36-1c07d2cd4db0</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;How, exactly, does it &amp;quot;crash&amp;quot; ? eg, Is it hitting the Nordic Fatal Error handler?&lt;/p&gt;
&lt;p&gt;Other suggestion:&lt;/p&gt;
&lt;p&gt;* think if there&amp;#39;s anything that your app does at 8 minutes (or some sub-multiple); eg timing-out or re-starting advertising&lt;/p&gt;
&lt;p&gt;* instrument your code to give diagnostic traces via UART or RTT&lt;/p&gt;
&lt;p&gt;* implement a memory buffer (not cleared by a reset) to record &amp;quot;breadcrumbs&amp;quot; as your code runs&lt;/p&gt;
&lt;p&gt;* Break execution shortly before 8 minutes - are you running out of stack, for example ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>