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.

[参考译文] TMS320C28346:将.projectspec 文件更改为当前工程文件夹下的输出文件

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1652992/tms320c28346-change-projectspec-file-to-output-files-under-the-current-project-folder

部件号: TMS320C28346

我有如下所示的工程文件 (.projectspec)、当我在 CCS v12 或 CCS v20 中编译工程时、CCS 会在 CCS 工作空间文件夹中生成.out 和.map 文件。

如何更改它以将这些文件写入当前工程文件夹。 例如、假设工程位于文件夹“C:/Abc/buck converter (PIL)(C CODE)“中、我希望将.out 文件保存在“C:/Abc/buck converter (PIL)(C CODE)/RamDebug/“文件夹中。

已尝试加载整个项目、但失败。

谢谢、

Jiakai

<projectSpec>
    <project name="buck_converter__SimCoder_"
             device="TMS320F28035"
             cgtVersion="16.9.1.LTS"
             launchWizard="False"
             linkerCommandFile="">
        <configuration name="RamDebug" compilerBuildOptions="--opt_level=off -v28 -ml -mt --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--stack_size=0x1B0 -heap=0 --entry_point=code_start" />
        <configuration name="RamRelease" compilerBuildOptions="--opt_level=3 -v28 -ml -mt --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--stack_size=0x1B0 -heap=0 --entry_point=code_start" />
        <configuration name="FlashRelease" compilerBuildOptions="--opt_level=3 -v28 -ml -mt --define=_FLASH --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--stack_size=0x1B0 -heap=0 --entry_point=code_start" />
        <configuration name="FlashRamRelease" compilerBuildOptions="--opt_level=3 -v28 -ml -mt --define=_FLASH --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--stack_size=0x1B0 -heap=0 --entry_point=code_start" />

        <file action="link" path="buck_converter__SimCoder_.c" targetDirectory="" />
        <file action="link" path="passwords.asm" targetDirectory="" />

        
        <file action="link" path="2803x_IQmath_BootROMsymbols.lib" targetDirectory="" />
        <file action="link" path="IQmath.lib" targetDirectory="" />
        <file action="link" path="PsBiosRamF03xFixpt.lib" targetDirectory="" applicableConfigurations="RamDebug,RamRelease"/>
        <file action="link" path="PsBiosRomF03xFixpt.lib" targetDirectory="" applicableConfigurations="FlashRelease,FlashRamRelease"/>

        
        <file action="link" path="F2803x_Headers_nonBIOS.cmd" targetDirectory="" />
        <file action="link" path="F28035_RAM_Lnk.cmd" targetDirectory="" applicableConfigurations="RamDebug,RamRelease" />
        <file action="link" path="F28035_FLASH_Lnk.cmd" targetDirectory="" applicableConfigurations="FlashRelease" />
        <file action="link" path="F28035_FLASH_RAM_Lnk.cmd" targetDirectory="" applicableConfigurations="FlashRamRelease" />

        
    </project>
</projectSpec>

 

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

    尊敬的 Jiakai:

    更好的方法是直接使用 CCS IDE。

    在 Project Explorer -> Project Properties→Build→Linker→Basic Options 中右键单击 Project 、您将找到相应的字段 --output_file 。

    在--output_file 中指定所需文件夹的路径(要将.out 文件存储在何处)。

    重新编译工程、.out 将保存在所需的文件夹中。

    谢谢、

    IRA

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

    尊敬的 Ira:

    我需要在程序中创建.projectspec 文件、而不仅仅是处理 一个工程。

    这是问题所在、我可以指定 CCS 不要将工程复制到 CCS 工作空间吗? 如果可以、CCS 将自动完成  

    将其编译在当前项目中、输出文件保存在当前项目文件夹的子文件夹下。

    如果答案是否、则需要在链接器选项中添加-m 和-o。 我在这里无法使用绝对路径、

    我需要在-o 和-m 中使用什么宏来指定当前项目文件夹? 我找到了所有相关的项目  

    CCS_PROJECT_DIR、CWD 和 PWD 等宏(或变量)指向 CCS 工作空间。

    谢谢、

    Jiakai

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

    尊敬的 Jiakai:

    很抱歉晚回复。 我对提问不清楚。 是否要在中创建.out、.map 等文件

    1. CCS wrokspace 内的子文件夹

    2.不在您的 CCS 工作区内的子文件夹

    您想通过 projectspec 文件而不是 CCS IDE 实现该操作吗? 是这样吗?

    您的意思是什么

    我是否可以指定 CCS 不将工程复制到 CCS 工作空间

    这是在您导入工程时吗? 您想在原始源位置编译/运行/修改工程、而不将其复制到您的工作区、然后再执行该操作吗? CCS 中有一个可通过此下拉菜单选择的选项

    谢谢、

    IRA