<?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>How to debug crashes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118573/how-to-debug-crashes</link><description>Hi! 
 How do you recommend to debug crashes? 
 Especially how do you recommend to debug crashes that happen to our customers that we cannot reproduce? 
 
 So far I have been trying to: 
 I know I can use arm-none-eabi-addr2line to get a line of the crash</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 31 Oct 2025 11:52:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118573/how-to-debug-crashes" /><item><title>RE: How to debug crashes</title><link>https://devzone.nordicsemi.com/thread/553005?ContentTypeID=1</link><pubDate>Fri, 31 Oct 2025 11:52:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9afef831-30fe-48e7-83a2-39ebd905b427</guid><dc:creator>kat829</dc:creator><description>&lt;p&gt;This looks like an AI SEO spam. No z_backtrace exists in the entire internet, and the hardly visible yellow link suggests that being on topic may not have been an intention at all.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug crashes</title><link>https://devzone.nordicsemi.com/thread/552538?ContentTypeID=1</link><pubDate>Mon, 27 Oct 2025 16:10:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0ea9c62-eb0d-4a03-b985-5a8cc7193322</guid><dc:creator>Lasnuix</dc:creator><description>&lt;blockquote data-start="871" data-end="1103"&gt;
&lt;p data-start="873" data-end="1103"&gt;I had similar issues. What helped me was implementing a custom fatal error handler that dumps the backtrace using &lt;code data-start="987" data-end="1002"&gt;z_backtrace()&lt;/code&gt; (if supported by your Zephyr version). It&amp;rsquo;s not perfect but gives a better idea of the call chain.&lt;/p&gt;
&lt;p style="text-align:right;" data-start="873" data-end="1103"&gt;&lt;span style="color:#ffff99;"&gt;&lt;a style="color:#ffff99;" href="https://driftboss.io"&gt;drift boss&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug crashes</title><link>https://devzone.nordicsemi.com/thread/521120?ContentTypeID=1</link><pubDate>Mon, 03 Feb 2025 13:29:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb46ad6b-2848-4d2f-94a3-1daabd0187ab</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi! We have a section on debugging here:&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-2-debugging/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-2-debugging/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug crashes</title><link>https://devzone.nordicsemi.com/thread/521110?ContentTypeID=1</link><pubDate>Mon, 03 Feb 2025 13:08:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6e45fb9-42cd-4bb1-b07e-45623345f90f</guid><dc:creator>Jakob Ruhe</dc:creator><description>&lt;p&gt;An assert is a good start. Not everyone agrees with me, but I think it is a good idea to have asserts enabled also in released applications.&lt;/p&gt;
&lt;p&gt;By using asserts also in your application (for example to ensure pointers are not NULL), it will be quicker for you to nail down problems. Then you will perhaps catch them before Zephyr and/or other frameworks you use do. That said, even though the assert is generic it can usually give some hint.&lt;/p&gt;
&lt;p&gt;A good practice for embedded applications is to have logging in place and log what is going on. Log levels should be used so that it is easy for everyone to distinguish between information messages, warnings and errors.&lt;/p&gt;
&lt;p&gt;For applications running in the field it is usually not possible to watch every logged message in real time. What instead can be done is to write log messages to a ring buffer stored in a section in RAM that is not cleared by the bootloader or the application. If the application detects that it did not shutdown in a controlled way, it reports the reason as to why it rebooted as well as the content of the ring buffer. Hopefully there is some way for the development team to get access to at least these crash reports.&lt;/p&gt;
&lt;p&gt;Also the tracing framework, which is part of Zephyr, could be worth looking into, but I have not used it myself.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>