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
[mbed] Importing program "mbed_blinky" from "https://mbed.org/teams/mbed/code/mbed_blinky" at latest revision in the current branch
20
-
[mbed] Adding library "mbed" from "http://mbed.org/users/mbed_official/code/mbed/builds" at rev #f9eeca106725
21
-
[mbed] Couldn't find build tools in your program. Downloading the mbed 2.0 SDK tools...
22
-
$ cd mbed-os-example-blinky
23
-
```
24
-
25
-
You can use the "import" command without specifying a full URL; Mbed CLI adds a [prefix](https://github.com/ARMmbed) to the URL if one is not present. For example, this command:
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:
40
7
@@ -49,46 +16,6 @@ Don't forget to set the current directory as the root of your program:
49
16
$ mbed new .
50
17
```
51
18
52
-
### Adding and removing libraries
53
-
54
-
While working on your code, you may need to add another library to your application or remove existing libraries.
55
-
56
-
Adding a new library to your program is not the same as cloning the repository. Don't clone a library using `hg` or `git`; use `mbed add` to add the library. This ensures that all libraries and sublibraries are populated as well.
57
-
58
-
Removing a library from your program is not the same as deleting the library directory. Mbed CLI updates and removes library reference files. Use `mbed remove` to remove the library; don't remove its directory with `rm`.
59
-
60
-
#### Adding a library
61
-
62
-
Use `mbed add` to add the latest revision of a library:
If you want to specify a directory to which to add your library, you can give an additional argument to ``add``, which names that directory. For example, If you'd rather add the previous library in a directory called "text-lcd" (instead of TextLCD):
Although Mbed CLI supports this functionality, we don't encourage it. Adding a library with a name that differs from its source repository can lead to confusion.
83
-
84
-
#### Removing a library
85
-
86
-
If at any point you decide that you don't need a library any more, you can use `mbed remove` with the path of the library:
87
-
88
-
```
89
-
$ mbed remove text-lcd
90
-
```
91
-
92
19
### Exporting to desktop IDEs
93
20
94
21
If you need to debug your code, you can export your source tree to an IDE project file to use the IDE's debugging facilities. Mbed CLI supports exporting to Keil uVision, IAR Workbench, a Makefile using GCC Arm, Eclipse using GCC Arm and other IDEs.
@@ -182,15 +109,15 @@ When you create a new (local) version control managed program or library, its re
182
109
1. Copy the URL/location of the new repository in your clipboard.
183
110
1. Open command-line in the local repository directory (for example, change directory to `mbed-os-example/local-lib`).
184
111
1. To associate the local repository:
185
-
112
+
186
113
- For Git, run `git remote add origin <url-or-path-to-your-remote-repo>`.
187
114
- For Mercurial, edit .hg/hgrc and add (or replace if exists):
188
-
115
+
189
116
```
190
117
[paths]
191
118
default = <url-or-path-to-your-remote-repo>
192
119
```
193
-
120
+
194
121
1. Run `mbed publish` to publish your changes.
195
122
196
123
In a scenario with nested local repositories, start with the leaf repositories first.
0 commit comments