docs(platform/xilinx): correct format, move minium configuration up
This commit is contained in:
+35
-37
@@ -16,9 +16,27 @@
|
||||
|
||||
- **xilinx.mk**: 被 [`generic.mk`](../../generic.mk) 定义了 Xilinx 平台的特定的编译规则;
|
||||
|
||||
## 配置文件结构
|
||||
## 配置文件说明
|
||||
|
||||
配置文件用于定义 Xilinx 平台项目的构建参数、应用配置和库依赖关系等信息,以便于在 `embedded-autobuild` 项目中自动化生成工程。以下是 Xilinx 配置文件各部分的详细说明。
|
||||
配置文件用于定义 Xilinx 平台项目的构建参数、应用配置和库依赖关系等信息,以便于在 `embedded-autobuild` 项目中自动化生成工程。以下为最小化完整配置示例,包含了所有必填字段,可作为基础配置参考。
|
||||
|
||||
```json
|
||||
{
|
||||
"project_name": "demo",
|
||||
"version": "0.0.0",
|
||||
"hw_design": "demo_v0.0.0.hdf",
|
||||
"apps": {
|
||||
"demo_app": {
|
||||
"sources": ["source/"],
|
||||
"target_cpu": "ps7_cortexa9_0",
|
||||
"os": "standalone",
|
||||
"language": "C",
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
如需添加更多配置请详细阅读后续 Xilinx 配置文件各部分的详细说明。
|
||||
|
||||
> **注**:以下针对字段的解释中 **加粗** 字段为必须参数,*斜体* 标注的字段为可选参数,可选参数不填写则使用对应 IDE 的默认配置。
|
||||
|
||||
@@ -157,23 +175,23 @@
|
||||
- **target_cpu**: 目标 CPU ID[^2];
|
||||
- **os**: 操作系统类型[^1],必须与 BSP/Domain 匹配;
|
||||
- **language**: 编程语言,"C" 或 "C++";
|
||||
-*bsp*: 应用所使用的 BSP 名称,若未指定则会自动创建名为 `<os>_<cpu_id>` 的 BSP/Domain.
|
||||
-*bsp_lib*: 针对自动创建的 BSP/Domain 所使用库的配置,与 [bsps](#-bsps) 中 `libs` 对应;
|
||||
-*bsp_config*: 针对自动创建的 BSP/Domain 配置与 [bsps](#-bsps) 中 `config` 对应;
|
||||
-*mem_layout*: 应用内存布局,包括堆栈大小和堆大小等;
|
||||
- *bsp*: 应用所使用的 BSP 名称,若未指定则会自动创建名为 `<os>_<cpu_id>` 的 BSP/Domain.
|
||||
- *bsp_lib*: 针对自动创建的 BSP/Domain 所使用库的配置,与 [bsps](#-bsps) 中 `libs` 对应;
|
||||
- *bsp_config*: 针对自动创建的 BSP/Domain 配置与 [bsps](#-bsps) 中 `config` 对应;
|
||||
- *mem_layout*: 应用内存布局,包括堆栈大小和堆大小等;
|
||||
-*heap_size*: 堆大小,必须写为十六进制,例如 "0x80000";
|
||||
-*stack_size*: 栈大小,必须写为十六进制,例如 "0x4000";
|
||||
-*build_config*: 编译目标配置,`release` 或 `debug`;
|
||||
-`assembler-flags`: 汇编器标志;
|
||||
-`compiler-misc`: 其他编译器选项;
|
||||
-`compiler-optimization`: 编译优化选项;
|
||||
-`linker-misc`: 链接器选项;
|
||||
-`linker-script`: 链接脚本路径;
|
||||
-`define-compiler-symbols`: 自定义的编译器宏定义符号列表;
|
||||
-`undef-compiler-symbols`: 要取消定义的符号列表;
|
||||
-`include-path`: 包含文件路径;
|
||||
-`libraries`: 需要链接的库;
|
||||
-`library-search-path`: 库搜索路径;
|
||||
- *build_config*: 编译目标配置,`release` 或 `debug`;
|
||||
- `assembler-flags`: 汇编器标志;
|
||||
- `compiler-misc`: 其他编译器选项;
|
||||
- `compiler-optimization`: 编译优化选项;
|
||||
- `linker-misc`: 链接器选项;
|
||||
- `linker-script`: 链接脚本路径;
|
||||
- `define-compiler-symbols`: 自定义的编译器宏定义符号列表;
|
||||
- `undef-compiler-symbols`: 要取消定义的符号列表;
|
||||
- `include-path`: 包含文件路径;
|
||||
- `libraries`: 需要链接的库;
|
||||
- `library-search-path`: 库搜索路径;
|
||||
|
||||
以下配置添加了一个名为 `demo_app` 的 Application 工程,该工程没有指定 BSP/Domain 但能够通过 `bsp_lib` 和 `bsp_config` 自动生成一个名为 `standalone_ps7_cortexa9_0` 的 BSP/Domain 工程。
|
||||
|
||||
@@ -216,26 +234,6 @@
|
||||
}
|
||||
```
|
||||
|
||||
### 完整配置示例
|
||||
|
||||
以下为最小化完整配置示例,包含了所有必填字段,可作为基础配置参考。
|
||||
|
||||
```json
|
||||
{
|
||||
"project_name": "demo",
|
||||
"version": "0.0.0",
|
||||
"hw_design": "demo_v0.0.0.hdf",
|
||||
"apps": {
|
||||
"demo_app": {
|
||||
"sources": ["source/"],
|
||||
"target_cpu": "ps7_cortexa9_0",
|
||||
"os": "standalone",
|
||||
"language": "C",
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
[^1]: 具体可配置项取决于对应 IDE 版本;
|
||||
|
||||
[^2]: 具体可选 CPU ID 取决于硬件型号;
|
||||
|
||||
Reference in New Issue
Block a user