other_file¶
Required: No
Type: List of misc. files
Condition: Yes
other_file
can be used to list other files that should be included in the project, but shouldn't be a part of the compiled binary, for example documentation. The files should be copied together with the project, and be presented in the IDE if possible.
Key | Required | Type | Description |
---|---|---|---|
path |
Yes | Path to file | |
project |
No | Map of project properties | Actions to perform on the file when adding to a project |
condition |
No | List of features | The file is added if all the given features are present |
unless |
No | List of features | The file is added unless any of the given features are present |
1 2 |
|
Project properties¶
In certain cases, it is desired to use a component to pre-load a project with a starting point for a file. The project properties map contains actions to perform on the file when generating the project. The only supported action is to copy the file into the project, transferring ownership to the user.
Key | Required | Type | Description |
---|---|---|---|
transfer_ownership |
Yes | Boolean | If true, ownership of the file is transferred to the project. This copies the file from the component into the project. |
directory |
No | String | Subdirectory relative to the project root to place the copied file. If not set, the file is copied to the project root directory. |
Ownership transfer is a one-shot operation. If a file with the same name already exists in the project at the given location, it is not overwritten by subsequent project generation actions.
The file is not added to the .slcp file when ownership is transferred. If the component transferring ownership is removed from the project, the file stays on disk, but is no longer referenced by any part of the project or its dependencies. It is up to the user at this point to decide whether to manually add the file to the project or not.
1 2 3 4 |
|