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 convert IAR project to CCs (the Z-stack mesh project for CC2538)

Other Parts Discussed in Thread: CC2538, Z-STACK

I'd like to use Z-stack mesh with CC2538, but it only include IAR project.

How can I convert to CCS v6 ?

I searched some of web pages that used MAVRK  and this Code Composer Form but  I didn't success anything yet.

  • Hi, I am new for the CCS.


    I start the Zigbee application using Z-stack mesh. but this stack's example is only for IAR.

    I'd like to use on the CCS (use 'CC2538' that support by CCS)

    when I open the IAR project with IAR (free version), It shows 6 different sub-project but it all share same library files.

    It looks like the cfg and icf files are only different. -- please correct me if I wrong!!

    I create the empty CCS project and copied the all library files (or call stack) onto the workspace

    then, How I indicate the sub-project??

    Or if I have to create 6 different project, how I indicate/divide to each project? ?!

  • Hi,

    There is no documentation or utility to convert an ARM project from IAR to CCS, therefore the work is entirely manual and I can only give some tips.

    Apart from the MAVRK information you mentioned before, there is also a document for MSP430 that talks about several details to look for when migrating code:
    www.ti.com/.../slau157ag.pdf

    I opened the mesh project in my IAR and fiddled with some of the compiler options that will help define what is being used by the code that will require manual work. For example, setting the "language conformance" to Standard, you can tell which source files are using IAR extensions and try to find matching constructs.

    Another option to check is the "C dialect": the TI ARM compiler has C99 extensions but is not 100% compliant (check additional details at the page below), therefore setting it to C89 will highlight some source files that may need work.
    processors.wiki.ti.com/.../C99_Support_in_TI_Compilers

    The linker options are not very critical, but the linker configuration file <CC2538.icf> will require manual work to comply with the TI linker.

    One idea is to create a blank project in CCS, which already contains important files for the device bootstrap and a compliant linker command file <cx2538xf53_ccs.cmd>.

    There are some other details that will probably be evident throughout the process, such as the entry point, or even the need to rebuild some of the support libraries.

    Hope this helps,
    Rafael
  • (moderator: merged two threads that are very similar)

    Hi,

    MIN GWAK said:
    How I indicate the sub-project??

    Each subproject in IAR is probably generating a library, therefore these can be easily created with CCS - to do this, simply create a new project and set the Output type to Static Library:

    In the main project you can then reference the subprojects by right-clicking on the project --> Properties and navigate to the Dependencies section:

    Hope this helps,

    Rafael

  • Thank you so much for Answer my question. it is very helpful for my project.

    here is another question for convert IAR to CCS.
    The IAR use 'f8wConfig.cfg' file to define at the compile time.
    (example: -DMAX_BINDING_CLUSTER_IDS=4, -DMAC_MAX_FRAME_SIZE=116 )

    And use 'CC2538.icf' file to define/ place for the Linker.
    (example: define memory mem with size = 4G; place in FLASH { readonly }; )

    How I use or change these files for CCS ?
  • Hi,

    MIN GWAK said:
    The IAR use 'f8wConfig.cfg' file to define at the compile time.

    You can do this two ways:

    1. If you open this file in a text editor, it already explains how to add each defined symbol to the project options and remove from this file. The procedure for IAR is identical as for CCS, apart from the exact place on the GUI.

    This is a manual process, as each symbol must be added one-by-one, but it has the advantage of keeping all the symbols required to build the project in a single place. Over time this tends to ease the learning curve for other developers that inherit this code.

    2. Use the option --cmd_file and pass this file as a parameter. This is the most straightforward way and the least disruptive for the original project. One detail, though: this cmd file does not accept // as comments, thus requiring you to change the original file and replace every instance of // with the pair /* */.

     

    MIN GWAK said:
    And use 'CC2538.icf' file to define/ place for the Linker.

    If you check the linker CMD file <cx2538xf53_ccs.cmd> automatically generated by the new project, you will see that all the relevant memory regions are already defined (FLASH, SRAM, etc.). How these related to the code, data, stack, heap, etc. can be seen in the following wiki page:

    http://processors.wiki.ti.com/index.php/Linker_Command_File_Primer

    Hope this helps,

    Rafael

     

  • Thanks so much!! It's really good info!!
  • Min,

    Where you able to get this to work on CCS? I am attempting the same with CCS and I am having similar set of issues.