<?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>Custom application error handler, ZigBee</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47312/custom-application-error-handler-zigbee</link><description>I tried to redefine weak app_error_fault_handler by custom one (nRF5 SDK for Thread and Zigbee v2.0.0, Segger Embedded Studio), according to https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v11.0.0%2Fgroup__app__error.html</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 May 2019 08:41:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47312/custom-application-error-handler-zigbee" /><item><title>RE: Custom application error handler, ZigBee</title><link>https://devzone.nordicsemi.com/thread/187819?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 08:41:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41e0fa9a-720e-406d-b085-f721537d1544</guid><dc:creator>AnnaR</dc:creator><description>&lt;p&gt;Hi, Andreas.&lt;/p&gt;
&lt;p&gt;Thanks for the clarification!&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Anna&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom application error handler, ZigBee</title><link>https://devzone.nordicsemi.com/thread/187806?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 08:27:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2157d384-09b5-4239-9a0e-32ee6c00ce4e</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi again Anna.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;app_error_fault_handler&lt;/strong&gt; inside the stack prints the same information as the &lt;strong&gt;app_error_fault_handler&lt;/strong&gt; found in &lt;strong&gt;components\libraries\util\app_error_weak.c &lt;/strong&gt;in the SDK, and then it asserts to &lt;strong&gt;zb_nrf52840_abort()&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom application error handler, ZigBee</title><link>https://devzone.nordicsemi.com/thread/187571?ContentTypeID=1</link><pubDate>Thu, 16 May 2019 15:19:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c168697b-6e2c-4dea-a720-e5bd11784585</guid><dc:creator>AnnaR</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Many thanks for your reply, I really appreciate your help.&lt;/p&gt;
&lt;p&gt;In order to left an original &lt;strong&gt;zb_nrf52840_abort(void)&lt;/strong&gt; function code for other projects, I can use the&lt;strong&gt; #ifdef-#else-#endif &lt;/strong&gt;directives&lt;strong&gt; &lt;/strong&gt;with some define from &amp;ldquo;target&amp;rdquo; project.&lt;/p&gt;
&lt;p&gt;But unlike &lt;strong&gt;app_error_fault_handler&lt;/strong&gt;, the error-describing parameters are not transferring to &amp;nbsp;&lt;strong&gt;zb_nrf52840_abort&lt;/strong&gt; function. So in this case, it is known that some error occurred, but unclear, which exactly.&lt;/p&gt;
&lt;p&gt;I found another variant, that is far from perfect too, though :)&lt;/p&gt;
&lt;p&gt;In the project options, I turned on the &amp;ldquo;&lt;strong&gt;Code &amp;gt; Linker &amp;gt; Allow Multiple Symbol Definition&lt;/strong&gt;&amp;rdquo; (by selecting &amp;ldquo;&lt;strong&gt;Yes&lt;/strong&gt;&amp;rdquo; value). According to GNU linker docs, this option allows multiple definitions and the first definition will be used.&lt;/p&gt;
&lt;p&gt;It works in my case, so linker uses my &lt;strong&gt;app_error_fault_handler&lt;/strong&gt; variant instead of one in ZigBee stack.&lt;/p&gt;
&lt;p&gt;However, I concern about stack handler. If they just call the &lt;strong&gt;zb_nrf52840_abort&lt;/strong&gt; function, it&amp;rsquo;s okay. But what if they realized some important stack-related error &amp;ldquo;resolvers&amp;rdquo;, which will not be used if I declare my handler? If it is possible, could you please advise me about it?&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Anna&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom application error handler, ZigBee</title><link>https://devzone.nordicsemi.com/thread/187402?ContentTypeID=1</link><pubDate>Thu, 16 May 2019 06:25:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdc4289f-ca08-4590-9589-74ffd501393a</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve had a dive in the SDK and the stack to try to find a solution. I&amp;#39;ve found one, but it is not perfect I&amp;#39;m afraid.&lt;/p&gt;
&lt;p&gt;First, just remove your redefintion of &lt;strong&gt;app_error_fault_handler. &lt;/strong&gt;Then try to implement how you would like to handle the errors in the function&amp;nbsp;&lt;strong&gt;void zb_nrf52840_abort(void)&lt;/strong&gt; in the library file &lt;strong&gt;external\zboss\osif\zb_nrf52840_common.c. &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It is in this function the Zigbee stack will end up after the &lt;strong&gt;app_error_fault_handler()&lt;/strong&gt; is called in the stack. Note that this will affect all your project since it is a modification of a library file.&lt;/p&gt;
&lt;p&gt;I hope this works for you.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom application error handler, ZigBee</title><link>https://devzone.nordicsemi.com/thread/187292?ContentTypeID=1</link><pubDate>Wed, 15 May 2019 13:39:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2dab53ab-8906-401d-a219-e9ca30d4cc0e</guid><dc:creator>AnnaR</dc:creator><description>&lt;p&gt;Hi, Andreas.&lt;/p&gt;
&lt;p&gt;Thanks, I know about the newest SDK version, just didn&amp;rsquo;t yet move the existing project to it. &lt;/p&gt;
&lt;p&gt;I would design the robust application (at least, as much as I can), so would prefer to have the control on the error handling, in case I need to add a specific reaction on some errors. &lt;/p&gt;
&lt;p&gt;After reading this tutorial &lt;a href="https://devzone.nordicsemi.com/b/blog/posts/an-introduction-to-error-handling-in-nrf5-projects"&gt;devzone.nordicsemi.com/.../an-introduction-to-error-handling-in-nrf5-projects&lt;/a&gt;&lt;br /&gt;I thought to use the APP_ERROR_CHECK() with app_error_fault_handler&lt;br /&gt;redefinition.&lt;/p&gt;
&lt;p&gt;But appears, if I use ZigBee stack, I cannot redefine app_error_fault_handler for my own (with current SDK and stack versions)? Does it correct?&lt;/p&gt;
&lt;p&gt;Maybe, there is another similar &amp;quot;simple&amp;quot; way to use custom error handler exists with the current SDK-stack versions?&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Anna&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom application error handler, ZigBee</title><link>https://devzone.nordicsemi.com/thread/187245?ContentTypeID=1</link><pubDate>Wed, 15 May 2019 12:01:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8b5ac60-01b7-4886-8e79-3d55f57b25bd</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Firstly, we have a new SDK for Thread and Zigbee out, version 3.0.0, I suggest you use that.&lt;/p&gt;
&lt;p&gt;Second, the &lt;strong&gt;app_error_fault_handler&lt;/strong&gt; is indeed defined in the stack, as well as in the SDK. Why would you want to redefine it?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>