<?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>ZBOSS NCP build optimization</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111420/zboss-ncp-build-optimization</link><description>Hello, 
 I build the ZBOSS NCP sample from NCS v2.6.0 for the nRF52840 dongle. I use the optimization flag -O2 (for speed) in the build configuration (VS Code NCS extension), and this causes the NCP to crash and reset when I send the ZDO_MGMT_NWK_UPDATE_REQ</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Aug 2024 12:10:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111420/zboss-ncp-build-optimization" /><item><title>RE: ZBOSS NCP build optimization</title><link>https://devzone.nordicsemi.com/thread/497150?ContentTypeID=1</link><pubDate>Tue, 06 Aug 2024 12:10:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62e05398-88c9-4952-a95e-9a49a4ac7442</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Damien,&lt;/p&gt;
&lt;p&gt;The problem can be fixed by adding NOP instructions to time-critical code in sdk-nrfxlib/nrf_802154/driver/, like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="diff"&gt;diff --git a/nrf_802154/driver/src/nrf_802154_request_swi.c b/nrf_802154/driver/src/nrf_802154_request_swi.c
index fe1b43a6..6bb8ab08 100644
--- a/nrf_802154/driver/src/nrf_802154_request_swi.c
+++ b/nrf_802154/driver/src/nrf_802154_request_swi.c
@@ -292,6 +292,10 @@ static inline void assert_interrupt_status(void)
     {                                              \
         assert_interrupt_status();                 \
         func_swi(__VA_ARGS__, &amp;amp;result);            \
+        __NOP();                                   \
+        __NOP();                                   \
+        __NOP();                                   \
+        __NOP();                                   \
     }                                              \
                                                    \
     return result;
@@ -307,6 +311,10 @@ static inline void assert_interrupt_status(void)
     {                                                 \
         assert_interrupt_status();                    \
         func_swi(&amp;amp;result);                            \
+        __NOP();                                      \
+        __NOP();                                      \
+        __NOP();                                      \
+        __NOP();                                      \
     }                                                 \
                                                       \
     return result;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Let me know if this also fixes the issue on your side.&lt;/p&gt;
&lt;p&gt;Please note that the -O2 option is non-default, so we cannot guarantee that all nRF Connect SDK components are tested with it.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ZBOSS NCP build optimization</title><link>https://devzone.nordicsemi.com/thread/488515?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2024 13:39:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18e3c7dd-5b8f-458b-8421-2ead11471733</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Damien,&lt;/p&gt;
&lt;p&gt;The developers have started looking into it, but I do not have any updates yet.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ZBOSS NCP build optimization</title><link>https://devzone.nordicsemi.com/thread/488102?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2024 11:15:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72df21f5-06ef-406c-abb9-0446c7a36156</guid><dc:creator>DaKa</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Anything new on this?&lt;br /&gt;&lt;br /&gt;BR,&lt;br /&gt;Damien&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ZBOSS NCP build optimization</title><link>https://devzone.nordicsemi.com/thread/485854?ContentTypeID=1</link><pubDate>Fri, 24 May 2024 13:47:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68e5f5e5-f963-4fe2-bd83-37c6d804dc07</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Damien,&lt;/p&gt;
&lt;p&gt;I have reported this to the developers. I will let you know when I have an update.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ZBOSS NCP build optimization</title><link>https://devzone.nordicsemi.com/thread/485652?ContentTypeID=1</link><pubDate>Thu, 23 May 2024 13:30:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39404ab4-dd63-4205-93be-e044f741d2cd</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Damien,&lt;/p&gt;
&lt;p&gt;I have been able to reproduce the issue. I am looking into it and will get back to you.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>