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.

How to Enable NV_RESTORE in Z-STACK GenericApp ?

Other Parts Discussed in Thread: Z-STACK, CC2530

Hi there, Im a biginner in ZIgbee and programming...I would like to know how to enable NV_Restore in the Sample Apps from Zstack? . Im really sorry but ive seen the code, Its really confusing for me, I dont know where to start programing in the SampleApps. I tried  setting the NV_RESTORE= TRUE ,but it seem that it  doesnt  work (NetworkID still Random, I would like it to maintained the same NetworkID in  the ZC is reset).please helpme  Thank you...

 

-NID

  • Hi NID,

     

    In general you can place and Enable/Disable different compilation flags in two places:

    1. "fw8Config.cfg" file, in project tree locate Tools folder, there you'll find this file, open it
      take a minute and read the intro (You should get it pretty quickly), then you can edit it
      for your benefit.
    2. When you open one of the SampleApps in IAR, open project options (Alt+F7), then go
      to "C\C++ Compiler" and select "Preprocessor" tab, there you'll find a window named
      "Defined symbols". Now simply write down NV_RESTORE=TRUE. Personally I prefer
      this option for NV compilation flags. One more thing here, if you want specific flag to be
      ignored by the compiler and you don't want to delete it you can always put a prefix "x",
      like that (for example) xNV_RESTORE=TRUE, compiler will ignore this line (if find it
      pretty handy).

    More info regarding compilation flags and the placement of these flags can be found here:

    (I strongly suggest you to read this document)

    "Z-stack installation folder\Documents\Z-Stack Compile Options.pdf"

     

    NID said:
    NetworkID still Random

    You should be enabling the NV_INIT option (NV_INIT=TRUE) too.

    Please read "Non-Volatile Memory Items" (section 9.6) in "Z-stack Developer's Guide.pdf".

     

    NID said:
    Im really sorry but ive seen the code, Its really confusing for me, I dont know where to start programing in the SampleApps

    A good place to start is to read "Z-Stack Sample Application For CC2530DB.pdf", this document

    can be found in here: "Z-stack installation folder\Documents\CC2530\"

    That is of course if your destination board includes cc2530 as a primary Z-stack processor.

     

    Hope this helps.

  • Thanks Igor :) , 1st method i tried but i couldnt located NV_RESTORE in the "fw8Config.cfg" file. 2nd Method didnt work either since only this defined symbol exist

    ZTOOL_P1
    MT_TASK
    MT_SYS_FUNC
    MT_ZDO_FUNC
    LCD_SUPPORTED=DEBUG

    -NID

  • Thanks a lot Igor, Yahooo  i got it working now....Thanks again

     

    -NID