<?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>What&amp;#39;s the use of NRF_MESH_ASSERT_DEBUG(*p_flags &amp;amp; MESH_CONFIG_ENTRY_FLAG_BUSY);?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75345/what-s-the-use-of-nrf_mesh_assert_debug-p_flags-mesh_config_entry_flag_busy</link><description>Hello, we are using nordic SDK 16.0 and mesh SDK 4.2.0. 
 In our project, sometimes at the start of the program, we are running into line 280 of mesh_config.c, a debug assert that looks for *p_flags &amp;amp; MESH_CONFIG_ENTRY_FLAG_BUSY. 
 Why is this assert</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Jun 2021 10:29:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75345/what-s-the-use-of-nrf_mesh_assert_debug-p_flags-mesh_config_entry_flag_busy" /><item><title>RE: What's the use of NRF_MESH_ASSERT_DEBUG(*p_flags &amp; MESH_CONFIG_ENTRY_FLAG_BUSY);?</title><link>https://devzone.nordicsemi.com/thread/314426?ContentTypeID=1</link><pubDate>Wed, 09 Jun 2021 10:29:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e285e65-3962-4c36-870d-af5e6d0cd1a6</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;You are correct about this only beeing triggered in debug mode.&lt;/p&gt;
&lt;p&gt;Glad you worked around it. I&amp;#39;ll see if I can track down the root cause of this.&lt;/p&gt;
&lt;p&gt;Br, &lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What's the use of NRF_MESH_ASSERT_DEBUG(*p_flags &amp; MESH_CONFIG_ENTRY_FLAG_BUSY);?</title><link>https://devzone.nordicsemi.com/thread/313899?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 11:29:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6ca8af7-4c88-4a4a-9cf1-bd7c16e201df</guid><dc:creator>rmarques</dc:creator><description>&lt;p&gt;The Segger file editor does not identify&amp;nbsp;NDEBUG being added when building the stack in release mode though. At least it grays out the first &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;&lt;span style="background-color:#bdbdbd;"&gt;ifdef&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt; and not the &lt;strong&gt;&lt;span style="background-color:#bfbfbf;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;else&lt;/span&gt;&lt;/strong&gt;, so I don&amp;#39;t know. I managed to go around the problem in the meanwhile though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What's the use of NRF_MESH_ASSERT_DEBUG(*p_flags &amp; MESH_CONFIG_ENTRY_FLAG_BUSY);?</title><link>https://devzone.nordicsemi.com/thread/313898?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 11:24:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18f453b7-b5d9-42fe-9a3b-4aab787292d1</guid><dc:creator>rmarques</dc:creator><description>&lt;p&gt;Sorry, I think I was not notified of this answer. This only happened sometimes but always in debug mode. I think it is a feature of the function not being triggered in release mode. Check here, line 80 of nrf_mesh_assert.h:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;&lt;span style="background-color:#c7c7c7;"&gt;/**&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;&lt;span style="background-color:#c7c7c7;"&gt; * Run-time assertion for debug use.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;&lt;span style="background-color:#c7c7c7;"&gt; * Debug assertions are only run if the stack is compiled in debug mode.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;&lt;span style="background-color:#c7c7c7;"&gt; */&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;&lt;span style="background-color:#c7c7c7;"&gt;#ifdef NDEBUG /* The NDEBUG define is added automatically when compiling in release mode. */&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;&lt;span style="background-color:#c7c7c7;"&gt; #define NRF_MESH_ASSERT_DEBUG(cond) (void) (cond)&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;&lt;span style="background-color:#c7c7c7;"&gt;#else&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;&lt;span style="background-color:#c7c7c7;"&gt; #define NRF_MESH_ASSERT_DEBUG(cond) NRF_MESH_ASSERT(cond)&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;&lt;span style="background-color:#c7c7c7;"&gt;#endif&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What's the use of NRF_MESH_ASSERT_DEBUG(*p_flags &amp; MESH_CONFIG_ENTRY_FLAG_BUSY);?</title><link>https://devzone.nordicsemi.com/thread/312223?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 21:01:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba0e0847-a515-4aaa-9bb1-9c8133d79d41</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;This doesn&amp;#39;t happen every time in debug mode either?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What's the use of NRF_MESH_ASSERT_DEBUG(*p_flags &amp; MESH_CONFIG_ENTRY_FLAG_BUSY);?</title><link>https://devzone.nordicsemi.com/thread/312222?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 21:00:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35f4ac83-28df-4260-be65-77b466bbdbf2</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Strange that this only occurs in debug mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll take a closer look and get back to you.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Br,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>