You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/advanced/mbed_targets.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -193,14 +193,14 @@ The `release_versions` property is a list of major versions of mbed OS that the
193
193
194
194
The `supported_form_factors` property is an optional list of form factors that a development board supports. You can use this property in C, C++ and assembly language by passing a macro prefixed with `TARGET_FF_` to the compiler. The accepted values for `supported_form_factors` are `ARDUINO`, which indicates compatibility with Arduino headers, and `MORPHO`, which indicates compatibility with ST Morpho headers.
195
195
196
-
# Style guide
196
+
##Style guide
197
197
198
198
A linting script for `targets.json` is available as `tools/targets/lint.py` in mbed OS. This script is a utility for avoiding common errors when defining targets and detecting style inconsistencies between targets. This linting script displays style errors based on a few rules outlined below.
199
199
200
-
## Rules enforced
200
+
###Rules enforced
201
201
There are two sets of rules: rules that affect how you must structure target inheritance and rules that govern what each role within the inheritance hierarchy can do.
202
202
203
-
### Inheritance rules
203
+
####Inheritance rules
204
204
A target's inheritance must look like one of these:
The linting script guesses where the Boards and Modules stop and the MCUs, Families and Subfamilies begin. An MCU, Family or Subfamily must have at least one Board or Module above it in any hierarchy.
216
216
217
-
### Role rules
217
+
####Role rules
218
218
219
219
For each of these target roles, some restrictions are in place:
220
220
- Families, MCUs and Subfamilies may contain the following keys:
@@ -272,10 +272,10 @@ For each of these target roles, some restrictions are in place:
272
272
- if `release_versions` contains 5, then `supported_toolchains` must contain all of `GCC_ARM`, `ARM` and `IAR`
273
273
- MCUs, Families and SubFamilies must set `public` to `false`
274
274
275
-
## Sample output
275
+
###Sample output
276
276
The linting script takes three subcommands: `targets`, `all-targets` and `orphans`.
277
277
278
-
### `targets` and `all-targets` commands
278
+
####`targets` and `all-targets` commands
279
279
280
280
The `targets` and `all-targets` commands both show errors within public inheritance hierarchies. For example:
281
281
@@ -320,7 +320,7 @@ target errors:
320
320
321
321
The `all-targets` command is very verbose, with output that matches the format above but is too long to reproduce here.
322
322
323
-
### `orphans` command
323
+
#### `orphans` command
324
324
325
325
The `orphans` command shows all targets that you cannot reach from a public target.
0 commit comments