This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cannot set breakpoint in ZDNwkMgr.c

Other Parts Discussed in Thread: Z-STACK

Hi

I modified Sensor Demo application and  am using IAR Embedded Workbench to debug it.

I try to set a breakpoint in ZDNwkMgr.c and cannot do it.  And it seems like I cannot set any breakpoint in that file.  I did not modify ZDNwkMgr.c and I can set breakpoints in Collector.c and some other files.

I wonder what is going on and how can I set breakpoint in ZDNwkMgr.c?

Thanks

John

 

  • Hi John,

    How may breakpoints do you set in total? I think you can only set 4 or 5 at most in IAR. You can try to remove some of your breakpoints and try to set one in ZDNwkMgr.c.

    Regards!

    YK Chen

  • Hi,

    maybe the network manager isn't enabled.

    Check your OSAL_xxx.c file, there you should find something like this:

    void osalInitTasks(void)
    {
      ...
    #if defined ( ZIGBEE_FREQ_AGILITY ) || defined ( ZIGBEE_PANID_CONFLICT )
      ZDNwkMgr_Init( taskID++ );
    #endif
      ...
    }

    So you have to define at least one of the two preprocessor symboles and then it should work.

    Felix

  • Hi, YK & Felix,

    Thanks for reply!  I made sure all breakpoints are removed before I try to set one in ZDNwkMgr.c.

    Felix is correct!  I don't think ZDNkMgr_Init is used by Sensor Demo application at all....  But somehow it is still compiled in... I can see the object files...

     

    Now I still don't know who updates/modifies _NIB?  The only place I see _NIB is updated is in ZDNwkMgr.c...

     

    Thanks

    John

  • Hi John,

    I think _NIB is updated/modified under ZStack library and application programmer like you and me are not allowed to access it.

    Regards!

    YK Chen

  • You are correct - the _NIB should be left to the Z-Stack library use only. There are API's to get access to what is in the _NIB, like NLME_GetRequest() and NLME_SetRequest(). Directly accessing the _NIB is similar to mucking with the registry on a Windows PC - once you get familiar enough, even though you shouldn't, eventually you do ;)

     

  • I did look into NLME_GetRequest.  However, it does not provide me enough information.

    Here is the link to my other question:

    http://e2e.ti.com/support/low_power_rf/f/158/t/181925.aspx#656038

    For coordinator, I initially set ZCD_NV_CHANLIST to include all channels for scan when forming the network.  Once it successfully forms the network, I try to find out what channel Z-Stack picks.  From Z-Stack API document, it seems I cannot find this out through NLME_GetRequest().  The only way seems to be accessing _NIB.LogicalChannel after the network is formed...

    So I wonder how can I find out which channel the device is used to form the network? if I should not access _NIB directly...

  • Okay, then - I'll post a detailed answer to your other question.