Skip to content

Commit 5a6a05e

Browse files
author
Jenny Plunkett
authored
Add instructions for multiple projects
Add instructions for multiple projects that use only one Mbed OS lib, using the MBED_OS_DIR config
1 parent b35d117 commit 5a6a05e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,25 @@ $ mbed new mbed-classic-program --mbedlib
216216

217217
You can create plain (empty) programs, without either Mbed OS 5 or Mbed OS 2, by using the `--create-only` option.
218218

219+
### Managing multiple Mbed projects
220+
221+
You can create multiple Mbed projects and use the same Mbed OS library directory for each of these projects with the following commands:
222+
223+
```
224+
$ cd <projects directory>
225+
$ git clone https://github.com/ARMmbed/mbed-os
226+
$ mbed config -G MBED_OS_DIR <projects directory>/mbed-os
227+
$ mbed new project1
228+
$ mbed new project2
229+
```
230+
231+
Add your `main.cpp` file and other project files to the `project1` and `project2` directories. Then compile each project with the same Mbed OS source directory from the `<projects directory>` directory with the following example commands:
232+
233+
```
234+
mbed compile -t ARM -m LPC1768 --source project1 --source mbed-os --build BUILD/project1
235+
mbed compile -t ARM -m K64F --source project2 --source mbed-os --build BUILD/project2
236+
```
237+
219238
### Importing an existing program
220239

221240
Use `mbed import` to clone an existing program and all its dependencies to your machine:

0 commit comments

Comments
 (0)