Skip to content

OOB_5.12 Clarification regarding label directories #1021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 20, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docs/reference/build_rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ Mbed OS build tools determine the type of source file found based on the file's

Label directories are directories that follow a naming convention: an upper case label type followed by an underscore followed by a label. The Mbed OS build tools define four label types:

- `TARGET`, constructed from the configuration value `target.extra_labels` and the name of the targets.
- `FEATURE`, constructed from the configuration value `target.features`.
- `COMPONENT`, controlled from the configuration value `target.components`.
- `TARGET`, constructed from the configuration value `target.extra_labels` or `extra_labels_add` and the name of the targets.
- `FEATURE`, constructed from the configuration value `target.features` or `features_add`.
- `COMPONENT`, controlled from the configuration value `target.components` or `components_add`.
- `TOOLCHAIN`, controlled completely by the toolchain used to build.

The Mbed OS build tools skip all label directories, unless you configure them explicitly, as described above.

The `target.<label directory>` syntax overrides existing label directories that are set in a different configuration file or inherited from a parent target. The `target.<label directory>_add` syntax extends the existing configuration.

#### Target directories

The target labeled directories are used for selecting sources specific to an MCU or MCU family. The set of directories included in a given build is all of the names of the targets in the inheritance hierarchy and the `target.extra_labels`. The following is an example `targets.json`:
Expand Down