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.

Starterware: Understanding How To Correctly work with starterware and other libraries

Tool/software: Starterware

Hi,

I want to understand what is the correct method of working with TI''s extensions such as starterware,NDK,SBL,SYS/BIOS ,...

should i just copy the sources to my own project (so they become source files like any other files in my project) or should i place the extracted tree under the CCS folder, let eclipse install it and then from the RTSC menu choose it - should that be enough and should define all needed include path and libraries for my project -- how and under what conditions will the libraries by compiled it such a case? if i need to make changes on some sources inside the TI's libraries what is the correct method of doing it (modify under the library itself or copy the specif file to my sources and modify it so the functions will overload the library ones?) - as you can see i am pretty confused about the correct way of working and using CCS and it's extensions and would appreciate any help and guidance you can give.

Thanks 

  • Hello Guy Mardiks,

    The both options mentioned by you can be chosen depending on what you are trying to achieve

    I would recommend installing the all packages into CCS directrory (or point it to CCS). This way you can concentrate on your application while the existing prebuild libraries can be used. When these packages are detected by CCS, you only need to select the required package through RTSC configuration option in project properties. This takes care of including header files, adding libraries etc.
    In case you need to modify library file you can either copy that file selectively into your sources or change file in package and rebuild library. Again decision depends upon how many files you need to modify and if change is temporary, if not copying file into project will allow your application to be used by others without modifying library.
  • Hi,

    Thanks a lot.

    About rebuilding the libraries - is there a way from CCS to tell it to rebuild the library or must this be done using the library makefile from command prompt?

    also , you mentioned that by adding the to CCS it should take care of all the prototypes needed (all the include paths for sources and libraries) -  this should mean i should not be needed to also add some extra include paths or add also the header files from the library if and when i need to modify some library code and thus taking some source files copy to my sources. I want to make sure if this is indeed correct ?

    Thanks

    Guy

  • Hello,

    Unfortunately as per my knowledge there is no way from CCS to rebuild library. You would have to do it through makefile only.

    About adding library source into application you will have to add include paths as source file may have included header file from local directory (using "" in include) or from the library common include paths.

    For most of libraries we use include path from 'packages' directory ex- #include <ti/ndk/inc/stkmain.h>. So if library file contains only #include <stkmain.h> you will need to modify it.
  • Hi, thanks a lot.

    If i am, as suggested, take a copy of the file where i need to put modifications and add it to my sources then i can change the path of the headers that this file includes, but if the header files that the files includes also include other header files from inside the library will that mean i will have to either copy and  modify all the other header files (which is undesired) or add the entire inside structure of the library to the project's search path which i am not sure is a very good idea. is there a way to tell the compiler that after the first header all the other includes from inside that header should be relative the the first header's location (the one that was included from the modified C file)?

    I hope i was clear enough with the question and that you can help.

    Thanks

  • Hello,

    I was not sure about header file dependency for copied source file.

    I quickly tried same on one of my CCS project and seeing there is no need to change anything else. I included udp.c from NDK package and modified <stkmain.h> include in it. It compiled clean without any errors.

    So it seems that header files includes will be taken care and no need to explicitly modify each of header file or copy entire structure. 

    Hope this helps!

  • Thanks a lot for all your help (i also tested it and it seems to be working - the relative path in the included header seems to be taken relative to the header's location itself and not of the original source)

    I will try it with the libraries and hopefully it will indeed work correctly.

    Thanks a lot for you help

    Guy

  • Hello,

    Glad to know your query is resolved.

    Can you please mark it as answered and close it?