importsources - 2023.2 简体中文

Vitis 统一软件平台文档 嵌入式软件开发 (UG1400)

Document ID
UG1400
Release Date
2023-12-13
Version
2023.2 简体中文

将源文件导入应用工程。

语法

importsources [OPTIONS]

将源文件从路径导入工作空间内的应用工程。

选项

选项 描述
-name <project-name> 源文件应导入到的应用工程。
-path <source-path> 应从中导入源文件的路径。如果 <source-path> 是文件,那么它将导入应用工程。如果 <source-path> 是目录,那么 <source-path> 的所有文件/子目录都将导入应用工程。在应用中,将覆盖所有现有源文件并复制新文件。除非使用 -linker-script 选项,否则不会将连接器脚本复制到应用目录中。
-soft-link 从 source-path 链接源文件,不复制源文件。
-target-path <dir-path> 源文件必须链接到或复制到的目录。如果不使用 target-path 选项,那么源文件将链接或复制到“src”目录。
-linker-script 同时复制连接器脚本。

返回

如果工程源文件导入成功,则不返回任何结果。如果使用的选项无效,或者如果无法读取/导入工程源文件,则返回错误字符串。

示例

importsources -name hello1 -path /tmp/wrk/wksp2/hello2

将“hello2”工程源文件(不含连接器脚本)导入“hello1”应用工程。

importsources -name hello1 -path /tmp/wrk/wksp2/hello2 -linker-script

将“hello2”工程源文件(含连接器脚本)导入“hello1”应用工程。

importsources -name hello1 -path /tmp/wrk/wksp2/hello_app -soft-link

创建从 hello_app 应用工程到 hello1 应用工程的软链接。