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 create a new zstack project for cc2538 from scratch out side the installed zstack workspace

Other Parts Discussed in Thread: CC2538

Hello all,

I am using cc2538 evaluation board , with zstack home 1.20 and IAR embedded workbench IDE  , and i have successfully compiled and build sample light and sample switch example project provided in zstack and i tested it on my board and it is working fine...... 

but now i want to create my own work space and own project file for above given example in IAR so anyone can please guide me how to create new project that includes all header file and target cnfig etc ..

Note :- from the doc i know how to modify and change existing sample projects provided in zstack as per our need and i tried that also and i am successfully  able to make my own project file in the zstack folder and it is working fine.....but now  i dont want to do this what i want is that instead of using and modifying existing sample project i want to make a project from scratch ( i will use sample light and light switch source code only) but this time i want to create proj workspace as per my choice and i dont want to use zstack sample projects workspace...inshort i dont want to copy  sample project i just want to create a completely new proj outside of the zstack folder......

i searched on internet a lot but i didnt find any solution for this...so  plz if some one can help me to solve this problem..

thanks in advance 

Maneesh

  • Hi Maneesh,

    I suggest the following approach:

    Open two instances of IAR. In one of them, open an existing workspace, e.g. Sample Light.

    In the other, start a new workspace: file->new->workspace

    Then create a new project: project->create new project

      toolchain: arm, empty project

    Add the project files, according to the files you see included in the original Sample Light project: project->add files

    Configure all project options by copying the values from the SampleLight project (open the configuration dialogue on both instances of IAR, and copy values in all sections and tabs): Project->Options

    After following the above steps, you should have a self-created project/workspace that is the same as the original Sample Light.

    In case you are only interested in creating the workspace and not the project itself, you can import the original sample light project into your newly created workspace: Project->add existing project

    Best regards,

    OD

  • Hi OD

    thanks for replying...  :)

    as u suggested i did the same thing i created the new workspace in my another pc drive and then i created a new project files in that and then all the source file listed in sample light application i copied all the sources file in a folder then in IAR i created 2 group (application -> in this group i added source file of sample light application and source group->in this i added all the header and soucre files and i created one tools group also in that i added all the files listed in tools group of sample light...) then i replicate all configuration setting given in option tab as it is in my project... i also gave path name for library files listed in sample light project but i am facing few problems ->

    1) As in sample light i can select co-ordinator, enddevice or router under workspace tab but in my project i amnot able to do this only debug and release option is coming there..so plz tell me how can i get co-ordinator, enddevice or router option under workspace tab..

    2) i included all the files but still i am getting error saying-


    Error[Pe147]: declaration is incompatible with "__interwork __softfp uint8 SSP_CCM_Encrypt(uint8, unsigned char *, unsigned char *, uint16, unsigned char *, unsigned C:\Users\Maneesh\Desktop\My_IAR_test_project\new_source\hal_ccm.c 124
    char *)" (declared at line 44 of "C:\Users\Maneesh\Desktop\My_IAR_test_project\new_source\hal_ccm.h")


    Error[Pe147]: declaration is incompatible with "__interwork __softfp uint8 SSP_CCM_Decrypt(uint8, unsigned char *, unsigned char *, uint16, unsigned char *, unsigned C:\Users\Maneesh\Desktop\My_IAR_test_project\new_source\hal_ccm.c 130
    char *)" (declared at line 45 of "C:\Users\Maneesh\Desktop\My_IAR_test_project\new_source\hal_ccm.h")

    Fatal Error[Pe1696]: cannot open source file "ZComDef.h" C:\Users\Maneesh\Desktop\My_IAR_test_project\Source\OSAL_SampleLight.c 45
    searched: "C:\Users\Maneesh\Desktop\My_IAR_test_project\Source\"
    searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\"
    searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\c\"

    Fatal Error[Pe1696]: cannot open source file "ZComDef.h" C:\Users\Maneesh\Desktop\My_IAR_test_project\Source\zcl_samplelight.c 36
    searched: "C:\Users\Maneesh\Desktop\My_IAR_test_project\Source\"
    searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\"
    searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\c\"

    Fatal Error[Pe1696]: cannot open source file "ZComDef.h" C:\Users\Maneesh\Desktop\My_IAR_test_project\Source\zcl_samplelight_data.c 44
    searched: "C:\Users\Maneesh\Desktop\My_IAR_test_project\Source\"
    searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\"
    searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\c\"

    even though i included ZComDef.h file under the source group of my project but still it is giving error.. i dont understand why???

    and compatibility issue was not in original sample light project but why it is coming in my project i i dont understand??? i included all the files given in sample light project and i did all the setting as it is....

    so sir will you plz help me in sorting out all these error so that i can compile my project properly.....plz help me... thank you.... 

    Thanks & regards,

    Maneesh

  • Hi OD,

    Plz reply..... 

    plz help me in sorting out all these error so that i can compile my project properly.....plz help me... thank you.... 

    Thanks & regards,

    Maneesh

  • Hi Maneesh,

    Please make sure include paths are set ok. Snapshot attached

    Thanks,

    Saurabh