Skip to content

Commit 6519da9

Browse files
Improving description of MBED_OS_DIR config option
Add some text to make it clear that this config option should be an absolute path.
1 parent 46e78f5 commit 6519da9

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

docs/tools/CLI/cli-create.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,25 +81,27 @@ $ mbed new mbed-classic-program --mbedlib
8181
You can create plain (empty) programs, without either Mbed OS 5 or Mbed OS 2, by using the `--create-only` option.
8282

8383
### Managing multiple Mbed projects
84-
85-
You can create multiple Mbed projects and use the same Mbed OS library directory for each of these projects with the following commands:
84+
By default there is a copy of mbed-os checked-out into each of your active mbed project directories.
85+
The configuration option ```MBED_OS_DIR``` allows you to create multiple mbed projects and use the same Mbed OS library directory for each of these projects.
86+
The ```MBED_OS_DIR``` configuration option should be set as an absolute path to a directory containing an implementation of mbed-os.
87+
The following commands illustrate this:
8688

8789
```
88-
$ cd <projects directory>
90+
$ cd /absolute/path/to/project/dir
8991
$ mbed import mbed-os
90-
$ mbed config -G MBED_OS_DIR <projects directory>/mbed-os
91-
[mbed] <projects directory>/mbed-os now set as global MBED_OS_DIR
92+
$ mbed config -G MBED_OS_DIR /absolute/path/to/project/dir/mbed-os
93+
[mbed] /absolute/path/to/project/dir/mbed-os now set as global MBED_OS_DIR
9294
$ mbed new project1
9395
[mbed] Creating new program "project1" (git)
9496
$ mbed new project2
9597
[mbed] Creating new program "project2" (git)
9698
```
9799

98-
Add your `main.cpp` file and other project files to the `project1` and `project2` directories. Then compile each project from the root `<projects directory>` with the following example commands:
100+
Add your `main.cpp` file and other project files to the `project1` and `project2` directories. Then compile each project from the root `/absolute/path/to/project/dir` with the following example commands:
99101

100102
```
101103
$ mbed compile -t ARM -m LPC1768 --source project1 --source mbed-os --build BUILD/project1
102-
$ mbed compile -t ARM -m K64F --source project2 --source mbed-os --build BUILD/project2
104+
$ mbed compile -t ARM -m K64F --source project2 --source mbed-os --build BUILD/project2
103105
```
104106

105107
Find more details on the `--source` switch in the [build rules documentation](../reference/mbed-os-build-rules.html).

0 commit comments

Comments
 (0)