Skip to content

Commit 3620e71

Browse files
committed
Add documentation for mbed deploy and improve mbed 2.0 related sections
1 parent 9686c64 commit 3620e71

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

README.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ This document covers the installation and usage of *mbed CLI*.
5050

5151
<span class="tips">**Note:** The directories of Git and Mercurial executables (`git` and `hg`) need to be in your system's PATH.</span>
5252

53-
* **Command-line compiler or IDE Toolchain** - *mbed CLI* invokes the [mbed OS](https://github.com/ARMmbed/mbed-os) tools for various features - compiling, testing, exporting to industry standard toolchains. To compile your code, you would need either of these:
53+
* **Command-line compiler or IDE Toolchain** - *mbed CLI* invokes the [mbed OS 4.0](https://github.com/ARMmbed/mbed-os) tools for various features - compiling, testing, exporting to industry standard toolchains. To compile your code, you would need either of these:
5454
* Compilers: GCC ARM, ARMCC 5, IAR
5555
* Toolchains: Keil uVision, DS-5, IAR Workbench
5656

@@ -101,7 +101,7 @@ To list all *mbed CLI* commands use `mbed --help`. A detailed command-specific h
101101

102102
#### Creating a new program
103103

104-
When you create a new program, *mbed CLI* automatically imports the latest [mbed OS release](https://github.com/ARMmbed/mbed-os/). This library represents a **release** of mbed OS and will pull in all the components of the OS, including its build tools and desktop IDE project generators.
104+
When you create a new program, *mbed CLI* automatically imports the latest [mbed OS release](https://github.com/ARMmbed/mbed-os/). This represents a **release** of mbed OS and will pull in all the components, including its build tools and desktop IDE project generators.
105105

106106
With this in mind, these are the steps for creating a new program (we'll call it `mbed-os-program`):
107107

@@ -140,12 +140,12 @@ mbed-os-program (mbed-os-program#189949915b9c)
140140

141141
<span class="notes">**Note**: If you want to start from an existing folder in your workspace, you can simply use `mbed new .`, which will initialize an mbed program and also initialize a new Git or Mercurial repository in that folder. You can control which source control management is used or prevent source control management initialization via `--scm [name|none]` option.</span>
142142

143-
*mbed CLI* is also compatible with programs based on the [mbed library](https://mbed.org/users/mbed_official/code/mbed/) and will automatically import the latest [mbed library release](https://mbed.org/users/mbed_official/code/mbed/) if `--mbedlib` option is specified e.g.
143+
*mbed CLI* is also compatible with mbed 2.0 programs based on the [mbed library](https://mbed.org/users/mbed_official/code/mbed/) and will automatically import the latest [mbed library release](https://mbed.org/users/mbed_official/code/mbed/) if `--mbedlib` option is specified e.g.
144144
```
145145
$ mbed new mbed-classic-program --mbedlib
146146
```
147147

148-
You can create plain (empty) programs, without either mbed OS or mbed library by adding the `--create-only` option.
148+
You can create plain (empty) programs, without either mbed OS 4.0 or mbed 2.0 by adding the `--create-only` option.
149149

150150

151151
#### Importing an existing program
@@ -157,11 +157,30 @@ $ mbed import https://github.com/ARMmbed/mbed-blinky/
157157
$ cd mbed-blinky
158158
```
159159

160-
*mbed CLI* also supports programs based on the mbed library, which are automatically detected and do not require additional options.
160+
*mbed CLI* also supports programs based on the mbed 2.0, which are automatically detected and do not require additional options.
161161

162162
```
163163
$ mbed import https://developer.mbed.org/teams/mbed/code/mbed_blinky/
164-
¢ cd mbed_blinky
164+
$ cd mbed_blinky
165+
```
166+
167+
168+
#### Importing from git/hg clone
169+
170+
If you have manually cloned a git repository into your workspace and you want to add all missing libraries, then you can use the `deploy` command:
171+
172+
```
173+
$ mbed deploy
174+
[mbed] Creating new program "test-prog" (git)
175+
[mbed] Adding library "mbed-os" from "https://github.com/ARMmbed/mbed-os/" at latest revision in the current branch
176+
[mbed] Adding library "mbed-os/core" from "https://github.com/mbedmicro/mbed/" at rev #b4bb088876cb72bda7006e423423aba4895d380c
177+
...
178+
```
179+
180+
Don't forget to set the current directory as a root of your program:
181+
182+
```
183+
$ mbed new .
165184
```
166185

167186

0 commit comments

Comments
 (0)