Stack dump in sdk when create an attribute new from cluster basic

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Stack dump in sdk when create an attribute new from cluster basic

1,059 Views
dangthanhnha_nt
Contributor I

Dear All,

I want create an attribute contain 100 byte data of cluster basic from router.

I user router is module chip jn5169, JN-AN-1217 sofware and sdk JN-SW-4170.

The step are described below:

1. I modify file basic.h in sdk:

      a. I deifine attribute: example 

            #ifdef CLD_BAS_ATTR_DQ_STRING_DEVE

            #define ATTR_DQ_STRING_DEVE                              1

            #else

            #define ATTR_DQ_STRING_DEVE                              0

            #endif

      b. I define  in CLD_BASIC_NUMBER_OF_OPTIONAL_ATTRIBUTE

                   ATTR_SW_BUILD_ID                +           \

                  ATTR_DQ_TOUCH_CFG               +           \

                  ATTR_RP_GROUP_ENPOINT           +           \

                  ATTR_DQ_STRING_DEVE

      c. I define "Basic Device Information attribute set attribute ID's":

               E_CLD_BAS_ATTR_DQ_STRING_DEVE               = 0xA003

       d. I define in struct BASIC_SERVER:

               #ifdef CLD_BAS_ATTR_DQ_STRING_DEVE

               tsZCL_OctetString              sDQStringDeve;

                uint8                       au8DQStringDeve[100];

               #endif

2. I modify basic.c in sdk:

      a. I add define in #ifdef BASIC_SERVER

          #ifdef CLD_BAS_ATTR_DQ_STRING_DEVE

         {E_CLD_BAS_ATTR_DQ_STRING_DEVE,             (E_ZCL_AF_RD|E_ZCL_AF_WR),  E_ZCL_CSTRING,   (uint3            2)(&((tsCLD_Basic*)(0))->sDQStringDeve),0},

          #endif

   

      b. I add define 

             #ifdef CLD_BAS_ATTR_DQ_STRING_DEVE

               ((tsCLD_Basic*)pvEndPointSharedStructPtr)>sDQStringDeve.u8MaxLength = sizeof(((tsCLD_Basic*)pvEndPointSharedStructPtr)->au8DQStringDeve);

               ((tsCLD_Basic*)pvEndPointSharedStructPtr)>sDQStringDeve.u8Length = 100;

                  ((tsCLD_Basic*)pvEndPointSharedStructPtr)-               >sDQStringDeve.pu8Data = ((tsCLD_Basic*)pvEndPointSharedStructPtr)->au8DQStringDeve;

             #endif

3. I add Attribte cluster into file zcl_options.h

   #define CLD_BAS_ATTR_DQ_STRING_DEVE

Question:

When I build and load file.bin into router is jn5169 it is error "Stack dump:"

File log_Stack_dump.txt is log error i print from uart after i config Enable all debug output.

Please let know the solution how to solve this error?

Thanks & Best Regards,

Nha Dang

Labels (2)
0 Kudos
3 Replies

917 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

Is there any reason that you want to add this information tho the basic cluster?

You are getting a trap error caused by the b.trap instruction or the debug unit

You could create your own cluster, please look at the next community post.

ZigBee 3.0: Adding Clusters

Also, you could send a unicast taking as reference the next post https://community.nxp.com/message/1012968 

Regards,

Mario

0 Kudos

917 Views
dangthanhnha_nt
Contributor I

Hi Mario,

In any case where the stack dump is encountered, is there any notification function before that?

And I can where is check the cause? (example: Ram, Eeprom is full).

Thanks & Best Regards,

Nha Dang

0 Kudos

917 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Dang,

You could use the stack measure files.StackMeasure.c

 vGetStackMeasure searches for the initialized value in the watermarked stack RAM area

For the EEPROM look at the app_pdm.c file

vDisplayPDMUsage()

Regards,

Mario

0 Kudos