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.
Tool/software: Code Composer Studio
Hello.
Just for a test I created a new project. I called it "JustATest. For this question, it is irrelevant that the target platform is, but I used my BBB. One of the first lines in main.c is
#include <xdc/std.h>
It compiles fine.
WHY??
The header file "std.h" is over in C:\ti\xdctools_3_32_02_25_core\packages\xdc. However that location is NOT defined anywhere in the project properties, and I even examined the build output. It's not there either.
Logically, this cannot compile, and yet, somehow, the compiler seems to be able to find the header file, Here is the actual output:
**** Build of configuration Debug for project JustATest **** "C:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 4 all -O making ../src/sysbios/sysbios.aea8fnv ... gmake[1]: Nothing to be done for 'all'. 'Building file: ../main.c' 'Invoking: ARM Compiler' "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/bin/armcl" -mv7A8 --code_state=32 -me --include_path="C:/Users/scott/workspace_v7/JustATest" --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include" --define=am3359 -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="main.d" --cmd_file="configPkg/compiler.opt" "../main.c" 'Finished building: ../main.c' ' ' making ../src/sysbios/sysbios.aea8fnv ... gmake[2]: Nothing to be done for 'all'. 'Building target: JustATest.out' 'Invoking: ARM Linker' "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/bin/armcl" -mv7A8 --code_state=32 -me --define=am3359 -g --diag_warning=225 --diag_wrap=off --display_error_number -z -m"JustATest.map" --heap_size=0x800 --stack_size=0x800 -i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/lib" -i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include" --reread_libs --define=A8_CORE=1 --diag_wrap=off --display_error_number --warn_sections --xml_link_info="JustATest_linkInfo.xml" --rom_model -o "JustATest.out" "./main.obj" -l"configPkg/linker.cmd" -llibc.a <Linking> 'Finished building target: JustATest.out' ' ' **** Build Finished ****
The only points of interest are the include statements in the compile step. Neither one of them mentions the xdctools_3_32_02_25_core\packages\xdc location.
How is the compiler finding it? And why is this behavior so obfuscated? It makes creating new projects all the more difficult.
-CSW
That option is telling the compiler to read a list of options from a file.Christopher Weber said:--cmd_file="configPkg/compiler.opt"
If you looking in the configPkg\compiler.opt file with the Debug directory (name of the Build Configuration) I think you will find a
-I"the C:\ti\xdctools_3_32_02_25_core\packages" include option (among others)
Chester Gillon said:If you looking in the configPkg\compiler.opt file with the Debug directory (name of the Build Configuration) I think you will find a
-I"the C:\ti\xdctools_3_32_02_25_core\packages" include option (among others)
Yup...
-I"C:/ti/ccsv7/ccs_base" -I"C:/ti/xdctools_3_32_02_25_core/packages"
Okay, semi cool. I tried to find a "ConfigPkg" at the root level, and it wasn't there. And the compiler directive doesn't indicate a subdirectory... so It's kind of the same question, only a different file... How did it find that one?
And, that file is auto generated. All based exclusively on the project properties?
The issue is: I was trying to create a simple demo project from old package, because the RTOS people decided to completely remove the demo from the PDK. So now my only source is the old "StarterWare", which is only documented up to CCS 5, and uses all the wrong directory locations for includes, libs, etc... If they hadn't decided to remove useful information from the PDK, I wouldn't be going grey trying to figure out how to accomplish this.
It would appear so,but can I, add that XDC to a basic project, and it will automatically spit out the options file?
Do I have to manually add the "--cmd_file="configPkg/compiler.opt" compiler directive? or does that happen automatically too?
Thanks.
-CSW