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.

[参考译文] CCS/TMS320F28388D:使用-ccs.args 传递附加参数的命令行不起作用

Guru**** 3020190 points

Other Parts Discussed in Thread: CCSTUDIO, C2000WARE

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/911277/ccs-tms320f28388d-command-line-to-pass-additional-arguments-using--ccs-args-does-not-work

器件型号:TMS320F28388D
Thread 中讨论的其他器件:CCStudio、 C2000WARE

工具/软件:Code Composer Studio

我尝试使用-ccs.args 将参数传递给编译器编译命令 ,但工具似乎完全忽略了 arg_file 中的内容。

使用 CCS 10.0。  在 cygwin 和 DOS 上运行。

添加了几个用于调试的简单代码行:

#if 已定义(Gen3_CONTRAL_BUIL_CPU1)
错误"CPU1"
#Elif defined (Gen3_CONTRAING_BUIING_CLA)
错误"CLA"
其他
错误"undef"
#endif

##这里是我的参数文件、名为:test

$ cat 测试
--define=Gen3_CONTRAL_BUIK_CLA

即使参数文件定义 了 Gen3_CONTRAL_BUIL_CLA、编译器仍然看不到它、并且调用了#error "undef"。  我可以在参数文件中写入任何垃圾、结果相同。

我知道测试文件可以正常工作、因为如果我在 CCS GUI 中使用它并更新项目设置以使用--cmd_file=test、它可以正常工作。  "#ERROR CLA"被调用。

提前感谢。

##这是我的命令行和输出

HDUONG@笔记本电脑- HDUONG /cygdrive/c/ti/ccs1000/ccs/eclipse
$./eclipsec -noSplash -data "c:\Users\legend\OneDrive"工作代码\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 无头构建正在启动... [周三、6月03日20:42:12 PDT 2020 ]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
预处理...


====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
正在构建...


****为项目 Gen3_pjt 构建配置 CPU1_FLASH ****

"C:\\ti\\ccs1000\\ccs\\utils\bin\\gmake"-k -j 8 all -O

编译文件:"../src/control/control.c
调用:C2000编译器
"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 --ie.
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"工作/代码/Gen3_DSP/供应商/ti/C2000Ware/device_support/f2838x/headers/include"-include_path="C:/Users/legend/On
eDrive/Work/code/Gen3_DSP/供应商/ti/C2000Ware/device_support/f2838x/common/include"-include_path="C:/Users/legend/OneDriv
E/work / code/Gen3_DSP/供应商/ti/C2000Ware/libraries/math/CLAmath/c28/include"--include_path="C:/Users/legend/OneDrive/work
code/Gen3_DSP/供应商/C2000Ware/driverlib/f2838x/driverlib"- include_path="C:/Users/legend/OneDrive/work/code/gen3_dsp/v
vendel/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_workariter=on --asm_listing --preproc_with_compile
--preproc_dependence="src="src/control/control.d_rain"--obj_directory="src/control""./src/control/control.c

>>编译失败
src/control/subdir_rules.mk:9:目标'strc/control/control.obj'的配方失败
"C:/Users/legend/OneDrive/work/code/gen3_dsp/gen3_pjt/inc/core/gen3_defs.h "、第92行:致命错误#35:#ERROR 指令:"u
NDEF"
1在编译"../src/control/control.c 时检测到灾难性错误。
编译已终止。
gmake:***[src/control/control.obj]错误1.

(笑声)

>>编译失败
src/hal/subdir_rules.mk:9:目标'strc/hal/wm_hal.obj'的配方失败
"C:/Users/legend/OneDrive/work/code/gen3_dsp/gen3_pjt/inc/core/gen3_defs.h "、第92行:致命错误#35:#ERROR 指令:"u
NDEF"
1在编译"../src/hal/pwm_hal.c 时检测到灾难性错误。
编译已终止。
gmake:***[src/hal/pwm_hal.obj]错误1.
gmake:目标"全部"不会由于错误而重新生成。

****构建完成****


====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
CCS 无头构建完成! 1个项目中有1个有错误。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    [引用 user="Huey Duong"]我尝试使用-ccs.args 将参数传递给编译器编译命令 ,但工具似乎完全忽略了 arg_file 中的内容。

    ccs.args 选项的目的不是传入其他编译器编译选项、而是传入其他 projectBuild 参数。 如果 projectBuild 命令可能具有可通过文本文件指定的非常长的选项列表、则该选项非常有用。

    不直接支持通过命令行传递其他编译器选项、如您尝试执行的操作。
    有关 类似的讨论和建议、请参阅此主题。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    好的、感谢您的快速响应。