<?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>Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71937/hardfault-in-memset-during-startup-of-zigbee-stack</link><description>Hi 
 
 Im trying to set up a project for development of a Zigbee / BLE based product. For that product, we use our own platform and SDK which includes the nordic nRF5 SDK for Thread and Zigbee. We use FreeRTOS in our platform, so therefore, I have chosen</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Mar 2021 14:18:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71937/hardfault-in-memset-during-startup-of-zigbee-stack" /><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/300708?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 14:18:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e1afd68-8569-4e80-a53c-95c94fcf88e6</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Good to hear that it was solved. Do not hesitate to ask if you are experiencing any more issues down the road.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/300579?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 08:05:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1058443a-3106-4c35-89a5-5a9df6f0f1d3</guid><dc:creator>patbra</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;This issue is no more relevant for us. We manage to solve it in another way. We are now using our own platform to build this example, and then it works fine.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Patrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/299158?ContentTypeID=1</link><pubDate>Thu, 11 Mar 2021 07:17:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3667a9b1-ddb6-4309-bfce-bd3ff237a906</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Our Zigbee team has seen some suspicious behavior when copying the content of the&amp;nbsp;&lt;em&gt;nrf_common.ld&amp;nbsp;&lt;/em&gt;to the examples linker script. Could you please try reverting these changes&amp;nbsp;and instead add the path to the&amp;nbsp;&lt;em&gt;nrf_common.ld&lt;/em&gt; script to the linker flags? It should be something like this, just align the path:&amp;nbsp;&lt;span&gt;&amp;quot;LDFLAGS += -L$(SDK_ROOT)/modules/nrfx/mdk&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Marte&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/299015?ContentTypeID=1</link><pubDate>Wed, 10 Mar 2021 13:48:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1aa12ce3-7b1d-43ee-8419-7524e179ab50</guid><dc:creator>patbra</dc:creator><description>&lt;p&gt;Yes this is how it is. The libraries (including ZBOSS) comes after the object files in the linker command.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;/Patrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/298350?ContentTypeID=1</link><pubDate>Mon, 08 Mar 2021 12:15:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65eb2e70-f6e9-4b6f-abaf-3535547c58e0</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Patrik,&lt;/p&gt;
&lt;p&gt;I got a response from them now. You should&amp;nbsp;&lt;span&gt;place the ZBOSS library after the object files in the linker command, so that when the linker looks for symbols, it doesn&amp;#39;t take weak ones from the ZBOSS library.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Marte&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/298124?ContentTypeID=1</link><pubDate>Fri, 05 Mar 2021 14:17:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c1d7883-fd00-4fcf-ab7a-6411481a59af</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Patrik,&lt;/p&gt;
&lt;p&gt;I have asked the Zigbee team for a clarification on this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/297995?ContentTypeID=1</link><pubDate>Fri, 05 Mar 2021 10:13:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:239f9bb5-2661-4623-a6b4-0c91ebc4d629</guid><dc:creator>patbra</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Is this really correct? The ZBOSS library is not in the end of the linker command, but if I try to make it the other way, it doesn&amp;#39;t link. And your Makefile looks like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Libraries common to all targets
LIB_FILES += \
  $(SDK_ROOT)/external/zboss/lib/gcc/libzboss.ed.a \
  $(SDK_ROOT)/external/zboss/lib/gcc/nrf52840/nrf_radio_driver.a \
  
...  

# Add standard libraries at the very end of the linker input, after all objects
# that may need symbols provided by these libraries.
LIB_FILES += -lc -lnosys -lm -lstdc++&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Patrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/297953?ContentTypeID=1</link><pubDate>Fri, 05 Mar 2021 06:43:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9aab304f-6b65-4035-b93a-7b497c521c8f</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Patrik,&lt;/p&gt;
&lt;p&gt;Could you please check the linker command? The ZBOSS library must be placed at the end of the command.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/297036?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 06:23:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:316236bf-f58d-4ea7-9b1a-e643af48957f</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Patrik,&lt;/p&gt;
&lt;p&gt;Thank you, I have forwarded this to the Zigbee team.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/297010?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 19:50:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1811238-25f7-429c-906d-8869ba9dcf4f</guid><dc:creator>patbra</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;We are using the this toolchain:&amp;nbsp;&lt;a href="https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2020-q2-update"&gt;https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2020-q2-update&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The linker script is &amp;quot;zigbee_multi_sensor_freertos_gcc_nrf52.ld&amp;quot;. One note about the linker script, is that I was not able to include the nrf_common.ld file. Then I get the following:&lt;/p&gt;
&lt;p&gt;c:/mbs/work/rf-network/mbstoolchains/gcc-arm-none-eabi-9-2020-q2/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: cannot open linker script file nrf_common.ld: No such file or directory&lt;br /&gt;collect2.exe: error: ld returned 1 exit status&lt;br /&gt;make: *** [/cygdrive/c/mbs/work/rf-network/products/multi_sensor_freertos2/abs-binary.mk:22: _output/products-multi_sensor_freertos2/NRF52_GCC-none-none-mbs_nrf_52840_v10/products-multi_sensor_freertos2.elf] Error 1&lt;/p&gt;
&lt;p&gt;Instead I copied the contents of the file where the include was.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have tried to experiment with the compiler and linker options, but unmodified, this is what we use in our platform:&lt;/p&gt;
&lt;p&gt;CFLAGS:&lt;/p&gt;
&lt;p&gt;-mthumb \&lt;br /&gt; -mcpu=cortex-m4 \&lt;br /&gt; -ffunction-sections \&lt;br /&gt; -fdata-sections \&lt;br /&gt; -mfloat-abi=hard -mfpu=fpv4-sp-d16 \&lt;br /&gt; -ggdb3 \&lt;br /&gt; -std=&lt;span&gt;gnu11&lt;/span&gt; \&lt;br /&gt; -O0&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;LDFLAGS:&lt;/p&gt;
&lt;p&gt;-mthumb \&lt;br /&gt; -mcpu=cortex-m4 \&lt;br /&gt; -mfloat-abi=hard -mfpu=fpv4-sp-d16 \&lt;br /&gt; -lc -lm \&lt;br /&gt; --specs=nano.specs \&lt;br /&gt; -Wl,--gc-sections \&lt;br /&gt; -ggdb3&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;/Patrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/296734?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 06:28:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8454ac9-9a7b-4254-be89-6cec05629e33</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Patrik,&lt;/p&gt;
&lt;p&gt;The Zigbee team is still trying to figure this out. Could you please share which linker you&amp;#39;re using, and whether you&amp;#39;re using other compiler or linker options than what is already present in the example in the SDK?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/296551?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2021 13:02:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0e1cbec-c6a0-4994-ba58-dc269daa4d0e</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Patrik,&lt;/p&gt;
&lt;p&gt;Thank you, I have forwarded this information to our Zigbee team. As for the second question, I believe they meant without multiprotocol, and possibly without FreeRTOS as well. If you tried the light bulb example without making any changes to it, then that would be without FreeRTOS, so knowing that you got the same issue there is very helpful.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/296542?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2021 12:49:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6268f5c2-abfb-402e-8b9f-b1e7325dea79</guid><dc:creator>patbra</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I tried example &amp;quot;examples/zigbee/light_control/light_bulb&amp;quot; and I get the same issue here.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;What do you mean with &amp;quot;Zigbee-only&amp;quot;? I try to run the example &amp;quot;&lt;span&gt;multi_sensor_freertos&amp;quot; and that example doesn&amp;#39;t use multi-protocol if that is what you mean?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Yes I use&amp;nbsp;gcc-arm-none-eabi-9-2020-q2&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;The example use role&amp;nbsp;ZB_ED_ROLE&lt;/li&gt;
&lt;li&gt;The example use &amp;quot;#include &amp;quot;zb_mem_config_med.h&amp;quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I use the example as is from the SDK. The difference is that:&lt;/p&gt;
&lt;p&gt;1. We use our own build system to compile and link&lt;/p&gt;
&lt;p&gt;2. We use our version of FreeRTOS. This should be an unmodified&amp;nbsp;FreeRTOS-Kernel 10.4.2 version&lt;/p&gt;
&lt;p&gt;This is probably some stupid mistake on my side. I just can&amp;#39;t figure out what. Maybe im missing some compile or link file. Or maybe some define in the Makefile that I have missed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Patrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/296221?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2021 11:20:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13065235-ac4b-4b98-b809-6365506c1ae4</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Patrik,&lt;/p&gt;
&lt;p&gt;Our Zigbee team have tried to reproduce the issue, but with no luck so far. They do have some questions that might help them solving it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do you experience this issue with other examples in our SDK?&lt;/li&gt;
&lt;li&gt;Is this issue present in Zigbee-only configuration?&lt;/li&gt;
&lt;li&gt;What toochain version are you using to compile this example? Is it gcc-arm-none-eabi-9-2020-q2?&lt;/li&gt;
&lt;li&gt;What Zigbee role does the device have? (ZED/ZR)?&lt;/li&gt;
&lt;li&gt;What memory config is used in your application? (zb_mem_config_min.h/med/max)?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/296046?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2021 13:58:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6d62b24-f41f-4c38-b115-fbe43ed12ed3</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Patrik,&lt;/p&gt;
&lt;p&gt;Thank you for the information. I will ask our Zigbee team internally if they have seen this issue before or might know what causes it. I will come back to you as soon as I hear back from them.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/296043?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2021 13:50:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:802259c4-928b-4dc7-add5-2523f51dfb4f</guid><dc:creator>patbra</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I am not using memset(). It seems like it is used from the Zigbee stack in function&amp;nbsp;&lt;span&gt;zb_init_configurable_mem() according to the call stack I provided.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;/Patrik&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault in memset during startup of Zigbee stack</title><link>https://devzone.nordicsemi.com/thread/296041?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2021 13:43:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd598aeb-0df5-4a50-9469-d6783713dbaa</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Patrik,&lt;/p&gt;
&lt;p&gt;Could you please share what you&amp;#39;re&amp;nbsp;using memset() for, and possibly a code snippet of where you&amp;#39;re using it, just to see what you&amp;#39;re doing? This would make it easier to try and figure out what it is that is failing.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>