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.
I have a project in MSVC which I want to migrate to TI CCS3.3.
I have a complex directory structure as sown below for my codebase in which both C and H fles exists at 2nd, 3rd and 4th level of directory structure and any c file could include any header file. I am facing a problem in giving relative path in include search path (-i option) in TI project.
In MSVC and other tools relative path is always relative to Project file or executable but it seems that it is not the case with CCS.
It seems that CCS expects header include path relative to the file and not the project but I want it the other way.
1. Is there any way to make all the include path relative to the project and not to every 'c' file? I don't want to use environmental variable to be used in project file.
2. Second problem is that when I put program level optimization as -pm -op2, CCS starts taking all path as relative to project but I want to make it work in pure Debug mode and don't want to change it in Debug and Release configuration.
Exmample directory structure :
root
API
inc
src
Module
m1
inc
src
m2
m21
inc
src
m22
inc
src
Mukul,
As it seems like you are new to CCS I would suggest that you start with CCSv4 instead of CCSv3.3.
If you want your include paths to be relative to the project location one easy way to do this is to use macros.
In CCSv3.3 the macro is $(Proj_dir)
In CCSv4 if you add an include path via the build options dialog and click the workspace button it will automatically use a macro for you or you can manually use the ${PROJECT_ROOT} macro.
Regards,
John
Is this supported in ccsv3.3? When I tried this I got strange results where ccs created a new include path that was thousands of characters long. Am I allowed to set Proj_dir to "." or "./" ?
Jason,
You can't set Proj_dir as it is a macro that CCS defines as the location of the project. i.e. if i have an include path in my build options that looks like $(Proj_dir)\john when CCS passes the path to the compiler it will convert it to C:\dir\john (assuming C:\dir is my project root). There are a couple of "built-in" macros like this but you can also define your own macros if needed. There is an older app note that was written for CCSv2 but is still applicable to CCSv3.3 that may help: http://focus.ti.com/lit/an/spra913/spra913.pdf
Regards,
John