AnsweredAssumed Answered

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

Question asked by Dang Thanh Nha on Jun 16, 2020
Latest reply on Jun 22, 2020 by Mario Ignacio Castaneda Lopez

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

Attachments

Outcomes