Skip to content

Commit

Permalink
Update YML-CBuild-Format.md
Browse files Browse the repository at this point in the history
Various minor adjustments according to Grammarly check
  • Loading branch information
rkopsch authored and brondani committed Jan 10, 2025
1 parent 696e36e commit 189e091
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions docs/YML-CBuild-Format.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- markdownlint-disable MD013 -->
<!-- markdownlint-disable MD036 -->

The following chapter explains the output files are generated by the `csolution` tool. Depending on options, the files `*.cbuild-pack.yml` and `*.cbuild-set.yml` are also used as input file. The build information files are used for:
The following chapter explains the output files generated by the `csolution` tool. Depending on options, the files `*.cbuild-pack.yml` and `*.cbuild-set.yml` are also used as input files. The build information files are used for:

- generate CMake input files via the [cbuild2cmake](build-operation.md#cbuild2cmake-generate-cmakelists-files) tool.
- provide details for the graphical user interface in [VS Code extension Arm CMSIS Solution](https://marketplace.visualstudio.com/items?itemName=Arm.cmsis-csolution).
Expand All @@ -12,23 +12,23 @@ File | Description
:-------------------------------------------------------|:----------------------
[`*.cbuild-idx.yml`](#cbuild-idxyml) | Index file of all `*.cbuild.yml` build descriptions; contains also overall information for the application.
[`*.cbuild.yml`](#cbuildyml) | Build description of a single [`*.cproject.yml`](YML-Input-Format.md#project-file-structure) input file; contains all information for the build step for a specific [context](build-overview.md#context) including references to the content used from software packs.
[`*.cbuild-pack.yml`](#cbuild-packyml)| Software packs recorded for the all input files ([`*.csolution.yml`](YML-Input-Format.md#project-file-structure), `cproject.yml`, and `.clayer.yml`); used as input file to ensure [reproducible builds](build-overview.md#reproducible-builds) that use the same software packs and pack versions.
[`*.cbuild-pack.yml`](#cbuild-packyml)| Software packs recorded for all input files ([`*.csolution.yml`](YML-Input-Format.md#project-file-structure), `cproject.yml`, and `.clayer.yml`); used as input file to ensure [reproducible builds](build-overview.md#reproducible-builds) that use the same software packs and pack versions.
[`*.cbuild-set.yml`](#cbuild-setyml) | [Context selection](build-overview.md#working-with-context-set) for the build process, enabled with option [--context-set:](build-tools.md#use-context-set).

## Directory Structure

The `csolution` based projects are portable across different host computers and use therefore **relative file references**.
The `csolution` based projects are portable across different host computers and use, therefore **relative file references**.

- All file references use relative paths to the base directory of the related `*.yml` file. Files that are within the file structure of the `csolution` base directory are also referenced using relative paths, i.e. `../layers/layer1/source-file1.c`.

- Files that are located in the [CMSIS-Pack root directory](installation.md#environment-variables) are prefixed with `${CMSIS_PACK_ROOT}`.

!!! Note
All file references to user source code should be relative paths. The prefixes `${CMSIS_PACK_ROOT}` and `${CMSIS_COMPILER_ROOT}` are used to refer to base directories of files that relate to software packs and compiler specific files. These base directories can also be on different filesystem drives.
All file references to user source code should be relative paths. The prefixes `${CMSIS_PACK_ROOT}` and `${CMSIS_COMPILER_ROOT}` are used to refer to base directories of files that relate to software packs and compiler-specific files. These base directories can also be on different filesystem drives.

- Files outside of the directory structure of `csolution` based application use absolute paths. If absolute paths are used, a `warning` is issued in the `*.cbuild-idx.yml` file.
- Files outside of the directory structure of a `csolution` based application use absolute paths. If absolute paths are used, a `warning` is issued in the `*.cbuild-idx.yml` file.

A typical directory structure of a `csolution` based application that uses common layers source files is shown below.
A typical directory structure of a `csolution` based application that uses common layers source files are shown below.

```yml
📦 # csolution base directory
Expand All @@ -48,7 +48,7 @@ A typical directory structure of a `csolution` based application that uses commo

## Lock Pack Versions

A *csolution project* refers to packs in different files (`*.csolution.yml`, `*.cproject.yml` or `*.clayer.yml`). To ensure consistent pack usage during application development (for example when new `target-types` or `build-types` are introduced) the `*.cbuild-pack.yml` file records the exact pack versions.
A *csolution project* refers to packs in different files (`*.csolution.yml`, `*.cproject.yml` or `*.clayer.yml`). To ensure consistent pack usage during application development (for example when new `target-types` or `build-types` are introduced), the `*.cbuild-pack.yml` file records the exact pack versions.

The required packs can be specified in *csolution project files* in the following ways:

Expand Down Expand Up @@ -91,7 +91,7 @@ The operation of the `csolution` command is as follows:
- Update the `*.cbuild-pack.yml` file (only if the content changes):
- *GenerateCbuildPack*: Generate the `resolved-pack:` list of packs required by all *contexts*. The original `pack:` specification is stored under `selected-by-pack:`.

With subsequent `csolution` command the information of the `*.cbuild-pack.yml` file is used to load the appropriate fully qualified pack versions, matching previously used packs.
With the subsequent `csolution` command, the information of the `*.cbuild-pack.yml` file is used to load the appropriate fully qualified pack versions, matching previously used packs.

## File Format

Expand Down Expand Up @@ -179,7 +179,7 @@ The `<project-name>.<build-type>+<target-type>.cbuild.yml` contains all informat
&nbsp;&nbsp;&nbsp; [`components:`](#components) | List of software components used.
&nbsp;&nbsp;&nbsp; [`apis:`](#apis) | List of API interfaces used.
&nbsp;&nbsp;&nbsp; [`groups:`](#groups) | List of source file groups along with source files.
&nbsp;&nbsp;&nbsp; [`constructed-files:`](#constructed-files) | List of files that are generated by RTE management of `csolution` tool.
&nbsp;&nbsp;&nbsp; [`constructed-files:`](#constructed-files) | List of files that are generated by RTE management of the `csolution` tool.
&nbsp;&nbsp;&nbsp; [`licenses:`](#licenses) | List of licenses used by the various software components of this project context.

**Example:**
Expand Down Expand Up @@ -333,12 +333,12 @@ The `configurations:` node lists possible configurations for [reference applicat
&nbsp;&nbsp;&nbsp;`target-configurations:` | List of possible configurations for the target-type.
&nbsp;&nbsp;&nbsp;- `configuration:` | Possible configuration for the reference application.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`- variables:` | List of variable names with configuration information.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`<layer-name>:` | Layer name with value that is the path to the `clayer.yml` file.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`<layer-name>:` | Layer name with a value that is the path to the `clayer.yml` file.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`description:` | Brief [description](YML-Input-Format.md#layer) text taken from `*.clayer.yml`.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`settings:` | Usage instructions for this layer.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`- set:` | Value of `set` and `info` taken from [`connect:`](YML-Input-Format.md#connect) in `*.clayer.yml`.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`path:` | Path to the directory that contains the layer (from *.PDSC file).
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`file:` | Name of the *.clayer.yml file (optional with relative path to the directory specified with path) (from `*.PDSC` file).
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`file:` | Name of the *.clayer.yml file (optional with a relative path to the directory specified with path) (from `*.PDSC` file).
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`copy-to:` | Proposed directory for the layer in the *csolution project* (from *.PDSC file).

**Example:**
Expand Down Expand Up @@ -416,7 +416,7 @@ The `cbuilds:` node lists all project context configurations that are generated
errors: true
messages:
errors:
- no compatible software layer found. Review required connections of the project
- no compatible software layer found. Review the required connections of the project
info:
- test.cbuild-set.yml - file is already up-to-date
```
Expand Down Expand Up @@ -500,7 +500,7 @@ Keyword | Description
`linker:` | Content
:-------------------------------------------------|:--------------------------------
`- regions:` | Path and file name of `regions_<device_or_board>.h`, used to generate a Linker Script via pre-processor.
`- script:` | Path and file name of the Linker Script template that is pre-processed.
`- script:` | Path and file name of the pre-processed Linker Script template.
[`- define:`](YML-Input-Format.md#define) | Define symbol settings for the linker script file preprocessor.

#### `groups:`
Expand Down Expand Up @@ -535,7 +535,7 @@ Keyword | Description
`apis:` | Content
:--------------------------------------------------------------|:------------------------------------
`- api:` | Name of the API.
&nbsp;&nbsp;&nbsp; [`condition:`](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/pdsc_conditions_pg.html#element_condition) | Reference to the condition ID of the software pack that triggered inclusion of this API.
&nbsp;&nbsp;&nbsp; [`condition:`](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/pdsc_conditions_pg.html#element_condition) | Reference to the condition ID of the software pack that triggered the inclusion of this API.
&nbsp;&nbsp;&nbsp; `from-pack:` | Pack that defines this API.
&nbsp;&nbsp;&nbsp; `implemented-by:` | Refers to the software componeent that implements the API.
&nbsp;&nbsp;&nbsp; [`files:`](#files-of-a-component) | List of files that belong to this API.
Expand All @@ -545,7 +545,7 @@ Keyword | Description
`components:` | Content
:--------------------------------------------------------------|:------------------------------------
`- component:` | Name of the software component.
&nbsp;&nbsp;&nbsp; [`condition:`](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/pdsc_conditions_pg.html#element_condition) | Reference to the condition ID of the software pack that triggered inclusion of this component.
&nbsp;&nbsp;&nbsp; [`condition:`](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/pdsc_conditions_pg.html#element_condition) | Reference to the condition ID of the software pack that triggered the inclusion of this component.
&nbsp;&nbsp;&nbsp; `from-pack:` | Pack that defines this component.
&nbsp;&nbsp;&nbsp; `selected-by:` | The original component name used in `cproject/clayer.YML`.
&nbsp;&nbsp;&nbsp; [`optimize:`](YML-Input-Format.md#optimize) | Optimize level for code generation.
Expand All @@ -564,9 +564,9 @@ Keyword | Description
`files:` | Content
:--------------------------------------------------------------|:------------------------------------
`- file:` | Name and path to the file.
&nbsp;&nbsp;&nbsp; [`category:`](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/pdsc_components_pg.html#FileCategoryEnum) | File category according Open-CMSIS-Pack specification
&nbsp;&nbsp;&nbsp; [`attr:`](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/pdsc_components_pg.html#FileAttributeEnum) | File category according Open-CMSIS-Pack specification; `api` refers to header files that define the api of a component.
&nbsp;&nbsp;&nbsp; [`condition:`](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/pdsc_conditions_pg.html#element_condition) | Reference to the condition ID of the software pack that triggered inclusion of this file.
&nbsp;&nbsp;&nbsp; [`category:`](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/pdsc_components_pg.html#FileCategoryEnum) | File category according to Open-CMSIS-Pack specification
&nbsp;&nbsp;&nbsp; [`attr:`](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/pdsc_components_pg.html#FileAttributeEnum) | File category according to Open-CMSIS-Pack specification; `api` refers to header files that define the api of a component.
&nbsp;&nbsp;&nbsp; [`condition:`](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/pdsc_conditions_pg.html#element_condition) | Reference to the condition ID of the software pack that triggered the inclusion of this file.
&nbsp;&nbsp;&nbsp; `select:` | Selection text for user code template files and api header files.
&nbsp;&nbsp;&nbsp; [`version:`](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/pdsc_components_pg.html#element_files) | For files that belong to components the version specified in the PDSC file.
&nbsp;&nbsp;&nbsp; [`base:`](build-overview.md#plm-of-configuration-files) | Unmodified configuration file (base file from the *software pack*) that is currently in use.
Expand All @@ -584,11 +584,11 @@ A list of files that are generated by the RTE management of the `csolution` tool

### Nodes for License Information

The `*.cbuild.<build-type>+<target-type>.yml` files contains license information about each software component that is included from software packs.
The `*.cbuild.<build-type>+<target-type>.yml` files contain license information about each software component that is included in software packs.

#### `licenses:`

Each different license that is used in an a project context has a sepearate section.
Each different license that is used in a project context has a separate section.

`licenses:` | Content
:--------------------------------------------------------|:------------------------------------
Expand Down Expand Up @@ -628,7 +628,7 @@ Each different license that is used in an a project context has a sepearate sect

## Generator Information Files

The `csolution run` command generates the following build information files in the [`intdir:`](YML-Input-Format.md#output-dirs) of the related `context`. These files are the input to a generator and provide the information about the *csolution project* to the generator. The files are generated in the [`tmp` directory](build-overview.md#output-directory-structure) of the project and contain absolute paths.
The `csolution run` command generates the following build information files in the [`intdir:`](YML-Input-Format.md#output-dirs) of the related `context`. These files are the input to a generator and provide information about the *csolution project* to the generator. The files are generated in the [`tmp` directory](build-overview.md#output-directory-structure) of the project and contain absolute paths.

File | Description
:-----------------------|:----------------------
Expand All @@ -654,10 +654,10 @@ File | Description
`cbuild-gens:` | Content
:--------------------------------------------------|:------------------------------------
`- cbuild-gen:` | Build information file with name `<context>.cbuild-gen.yml`; structure identical with [*.cbuild.yml](#cbuildyml).
&nbsp;&nbsp;&nbsp; `project:` | Project name (used as name for `*.cgen.yml` when `name:` is not specified)
&nbsp;&nbsp;&nbsp; `project:` | Project name (used as a name for `*.cgen.yml` when `name:` is not specified)
&nbsp;&nbsp;&nbsp; `configuration:` | Specifies `.build-type+target-type` of this context.
&nbsp;&nbsp;&nbsp; `name:` | Explicit name for the `*.cgen.yml` [generator import file](#generator-import-file) specified by [`generator options`](YML-Input-Format.md#generators-options).
&nbsp;&nbsp;&nbsp; `map:` | Mapping to a generator specific run-time context name specified by [`generator options`](YML-Input-Format.md#generators-options).
&nbsp;&nbsp;&nbsp; `map:` | Mapping to a generator-specific run-time context name specified by [`generator options`](YML-Input-Format.md#generators-options).

**Example:**

Expand All @@ -680,7 +680,7 @@ build-gen-idx:

## Generator Import File

The `*.cgen.yml` file lists the generated *csolution project* part and starts with the node `generator-import:`. It defines similar to a [Software Layer](build-overview.md#software-layers) additional parameters, files, and components that are included in the project.
The `*.cgen.yml` file lists the generated *csolution project* part and starts with the node `generator-import:`. It is defined similarly to a [Software Layer](build-overview.md#software-layers) additional parameters, files, and components that are included in the project.

### File Structure of `*.cgen.yml`

Expand Down

0 comments on commit 189e091

Please sign in to comment.