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.
你(们)好
我有一个 F280049项目文件(.projectspec)、所有文件都链接到原始文件夹。
指定这些库文件和链接文件(.cmd)的搜索路径的常规方法是什么?
我不想使用"-i"来指定项目文件中原始文件夹的绝对路径。
该项目如下:
<projectSpec> <project name="1_ph_Pwm_with_DC_input" device="TMS320F280049M" cgtVersion="16.9.1.LTS" launchWizard="False" linkerCommandFile="" > <configuration name="1_RamDebug" compilerBuildOptions="--opt_level=off -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 --define=CPU1 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--stack_size=0x30A -heap=0 --entry_point code_start" /> <configuration name="2_RamRelease" compilerBuildOptions="--opt_level=3 -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 --define=CPU1 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--stack_size=0x30A -heap=0 --entry_point code_start" /> <configuration name="3_FlashRelease" compilerBuildOptions="--opt_level=3 -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 --define=CPU1 --define=_FLASH --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--stack_size=0x30A -heap=0 --entry_point code_start" /> <configuration name="4_FlashRamRelease" compilerBuildOptions="--opt_level=3 -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 --define=CPU1 --define=_FLASH --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--stack_size=0x30A -heap=0 --entry_point code_start" /> <file action="link" path="1_ph_Pwm_with_DC_input.c" targetDirectory="" /> <file action="link" path="F28004xCla.cla" targetDirectory="" /> <file action="link" path="PsBiosRamF004xFloat.lib" targetDirectory="" applicableConfigurations="1_RamDebug,2_RamRelease" /> <file action="link" path="PsBiosRomF004xFloat.lib" targetDirectory="" applicableConfigurations="3_FlashRelease,4_FlashRamRelease" /> <file action="link" path="cla2_math_library_datarom_fpu32.lib" targetDirectory="" /> <file action="link" path="F28004x_CLADATROM_Symbols_fpu32.lib" targetDirectory="" /> <file action="link" path="f28004x_headers_nonbios.cmd" targetDirectory="" /> <file action="link" path="F280049_RAM_lnk.cmd" targetDirectory="" applicableConfigurations="1_RamDebug,2_RamRelease" /> <file action="link" path="F280049_FLASH_lnk.cmd" targetDirectory="" applicableConfigurations="3_FlashRelease" /> <file action="link" path="F280049_FLASH_RAM_lnk.cmd" targetDirectory="" applicableConfigurations="4_FlashRamRelease" /> </project> </projectSpec>
谢谢、
Jiakai
您好!
[引用 userid="111331" URL"~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1167994/tms320f280049-how-to-specify-the-original-folder-when-the-ccs-project-file-using-link-not-copy-for-library-files-or-cmd-files "]指定这些库文件和链接文件(.cmd)的搜索路径的常规方法是什么?
我不想使用"-i"来指定项目文件中原始文件夹的绝对路径。
[/报价]您可以使用 --search_path 或-i 链接器选项来指定链接器查找库或由--library 或-l 指定的 cmd 文件的搜索路径,而不是显式将文件链接到工程
构建变量或相对路径可用于避免绝对路径。
希望这对您有所帮助
Ki
您好 Ki、
如果 使用--library,我还需要提供与搜索路径相同的绝对路径。
谢谢、
Jiakai
如果通过--search_path 获得正确的搜索路径,则在使用--library 时只需要指定文件名。 链接器将在指定的搜索路径中查找该库名称。
这是我的问题、我不想在工程文件中使用绝对路径、如果我更改文件夹名称、我必须更改绝对路径。
如前所述、您可以使用构建变量或相对路径来避免绝对路径
您好 Ki、
我看到、我可以使用 CCS_PROJECT_DIR。
非常感谢!
Jiakai