This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Hardfault in memset during startup of Zigbee stack

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 "examples/zigbee/experimental/multi_sensor_freertos" as a starting point for my application. 

We use our own build system, based on GNU Make, so therefore I have looked at the file "examples/zigbee/experimental/multi_sensor_freertos/pca10056/blank/armgcc/Makefile", and I have tried to get everything in there to match my own build.

The project compiles and starts, but during initialization of the Zigbee stack, I get a hardfault when using memset() in zb_init_configurable_mem(). 

I have tried to use memset() in main.c and it works as expected. Any ideas of what I have missed?

Thank you,

/Patrik

Parents Reply Children
  • Hi Patrik,

    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.

    Best regards,

    Marte

  • Hi Patrik,

    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:

    • Do you experience this issue with other examples in our SDK?
    • Is this issue present in Zigbee-only configuration?
    • What toochain version are you using to compile this example? Is it gcc-arm-none-eabi-9-2020-q2?
    • What Zigbee role does the device have? (ZED/ZR)?
    • What memory config is used in your application? (zb_mem_config_min.h/med/max)?

    Best regards,

    Marte

  • Hi

    1. I tried example "examples/zigbee/light_control/light_bulb" and I get the same issue here. 
    2. What do you mean with "Zigbee-only"? I try to run the example "multi_sensor_freertos" and that example doesn't use multi-protocol if that is what you mean?
    3. Yes I use gcc-arm-none-eabi-9-2020-q2
    4. The example use role ZB_ED_ROLE
    5. The example use "#include "zb_mem_config_med.h"

    I use the example as is from the SDK. The difference is that:

    1. We use our own build system to compile and link

    2. We use our version of FreeRTOS. This should be an unmodified FreeRTOS-Kernel 10.4.2 version

    This is probably some stupid mistake on my side. I just can't figure out what. Maybe im missing some compile or link file. Or maybe some define in the Makefile that I have missed. 

    Regards,

    Patrik

  • Hi Patrik,

    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.

    Best regards,

    Marte

  • Hi Patrik,

    The Zigbee team is still trying to figure this out. Could you please share which linker you're using, and whether you're using other compiler or linker options than what is already present in the example in the SDK?

    Best regards,

    Marte

Related