Other Parts Discussed in Thread: CCSTUDIO, C2000WARE
Tool/software: Code Composer Studio
I'm trying to pass in an argument to the compiler build command using -ccs.args <arg_file>, but it seems like the tool is completely ignoring what is in the arg_file.
Using CCS 10.0. Ran on cygwin and DOS.
Added a couple of simple lines of code to debug:
#if defined(GEN3_CONTROL_BUILD_CPU1)
#error "CPU1"
#elif defined(GEN3_CONTROL_BUILD_CLA)
#error "CLA"
#else
#error "UNDEF"
#endif
## Here is my argument file named: test
$ cat test
--define=GEN3_CONTROL_BUILD_CLA
Even though the argument file defines GEN3_CONTROL_BUILD_CLA, the compiler still doesn't see it and the #error "UNDEF" is called. I can write any garbage in the argument file and it would have the same result.
I know the test file works because if I used it in CCS GUI and updated project settings to use --cmd_file=test it works fine. "#error CLA" is called.
Thanks in advance.
## here is my command line and output
hduong@LAPTOP-HDUONG /cygdrive/c/ti/ccs1000/ccs/eclipse
$ ./eclipsec -noSplash -data "c:\Users\legend\OneDrive\work\code\gen3_ws_laptop" -application com.ti.ccstudio.apps.projectBuild -ccs.projects gen3_pjt -ccs.configuration CPU1_FLASH -ccs.args "c:\Users\legend\OneDrive\work\code\gen3_dsp\test"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CCS headless build starting... [Wed Jun 03 20:42:12 PDT 2020]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
================================================================================
Pre processing...
================================================================================
Building...
**** Build of configuration CPU1_FLASH for project gen3_pjt ****
"C:\\ti\\ccs1000\\ccs\\utils\\bin\\gmake" -k -j 8 all -O
Building file: "../src/control/control.c"
Invoking: C2000 Compiler
"C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-c2000_20.2.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu64
--idiv_support=idiv0 --tmu_support=tmu0 --vcu_support=vcu2 -O2 --opt_for_speed=0 --fp_mode=relaxed --fp_reassoc=on --inclu
de_path="C:/Users/legend/OneDrive/work/code/gen3_dsp/gen3_pjt" --include_path="C:/Users/legend/OneDrive/work/code/gen3_dsp/
gen3_pjt/inc/hal" --include_path="C:/Users/legend/OneDrive/work/code/gen3_dsp/gen3_pjt/inc/cli" --include_path="C:/Users/le
gend/OneDrive/work/code/gen3_dsp/gen3_pjt/inc/core" --include_path="C:/Users/legend/OneDrive/work/code/gen3_dsp/gen3_pjt/in
c/control" --include_path="C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-c2000_20.2.0.LTS/include" --include_path="C:/Users/legen
d/OneDrive/work/code/gen3_dsp/vendor/ti/C2000Ware/device_support/f2838x/headers/include" --include_path="C:/Users/legend/On
eDrive/work/code/gen3_dsp/vendor/ti/C2000Ware/device_support/f2838x/common/include" --include_path="C:/Users/legend/OneDriv
e/work/code/gen3_dsp/vendor/ti/C2000Ware/libraries/math/CLAmath/c28/include" --include_path="C:/Users/legend/OneDrive/work/
code/gen3_dsp/vendor/ti/C2000Ware/driverlib/f2838x/driverlib" --include_path="C:/Users/legend/OneDrive/work/code/gen3_dsp/v
endor/ti/C2000Ware/driverlib/f2838x/driverlib/inc" --advice:performance=all --define=_FLASH --define=DEBUG --define=CPU1 -g
--c11 --printf_support=minimal --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_
subsections=on --abi=eabi --cla_background_task=on --cla_signed_compare_workaround=on --asm_listing --preproc_with_compile
--preproc_dependency="src/control/control.d_raw" --obj_directory="src/control" "../src/control/control.c"
>> Compilation failure
src/control/subdir_rules.mk:9: recipe for target 'src/control/control.obj' failed
"C:/Users/legend/OneDrive/work/code/gen3_dsp/gen3_pjt/inc/core/gen3_defs.h", line 92: fatal error #35: #error directive: "U
NDEF"
1 catastrophic error detected in the compilation of "../src/control/control.c".
Compilation terminated.
gmake: *** [src/control/control.obj] Error 1
...
>> Compilation failure
src/hal/subdir_rules.mk:9: recipe for target 'src/hal/pwm_hal.obj' failed
"C:/Users/legend/OneDrive/work/code/gen3_dsp/gen3_pjt/inc/core/gen3_defs.h", line 92: fatal error #35: #error directive: "U
NDEF"
1 catastrophic error detected in the compilation of "../src/hal/pwm_hal.c".
Compilation terminated.
gmake: *** [src/hal/pwm_hal.obj] Error 1
gmake: Target 'all' not remade because of errors.
**** Build Finished ****
================================================================================
CCS headless build complete! 1 out of 1 projects have errors.