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: README.md
+21-15Lines changed: 21 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -58,23 +58,27 @@ This document covers the installation and usage of *mbed CLI*.
58
58
59
59
You can get the latest stable version of *mbed CLI* via PyPI by running:
60
60
61
-
``$ pip install mbed-cli``
61
+
```
62
+
$ pip install mbed-cli
63
+
```
62
64
63
65
Alternatively you get the development version of *mbed CLI* by cloning the development repository [https://github.com/ARMmbed/mbed-cli](https://github.com/ARMmbed/mbed-cli):
Once cloned you can install *mbed CLI* as a python package:
68
70
69
-
``$ python setup.py install`` (on Linux/Mac, you may need to run with ``sudo`` as well)
71
+
`$ python setup.py install` (on Linux/Mac, you may need to run with `sudo` as well)
70
72
71
73
<spanclass="tips">**Note:***mbed CLI* is compatible with [Virtual Python Environment (virtualenv)](https://pypi.python.org/pypi/virtualenv). You can read more about isolated Python virtual environments [here](http://docs.python-guide.org/en/latest/).</span>
72
74
73
75
### Uninstalling mbed CLI
74
76
75
77
To uninstall *mbed CLI*, simply run:
76
78
77
-
``pip uninstall mbed-cli``
79
+
```
80
+
pip uninstall mbed-cli
81
+
```
78
82
79
83
## Using mbed CLI
80
84
@@ -291,19 +295,21 @@ Run `mbed update <tag_name|revision> --clean`
291
295
292
296
__When you have unpublished local libraries__
293
297
294
-
There are two additional options that define how unpublished local libraries are handled:
298
+
There are 3 additional options that define how unpublished local libraries are handled:
295
299
296
-
`mbed update --ignore` - update the current program or library and its dependencies, and ignore any local unpublished libraries (they won't be deleted or modified, just ignored).
300
+
`mbed update --clean-deps` - update the current program or library and its dependencies, and discard all local unpublished repositories. Use this with caution as your local unpublished repositories cannot be restored unless you have a backup copy.
301
+
302
+
`mbed update --clean-files` - update the current program or library and its dependencies, discard local uncommitted changes and remove any untracked or ignored files. Use this with caution as your local unpublished repositories cannot be restored unless you have a backup copy.
297
303
298
-
`mbed update --force` - update the current program or library and its dependencies, and discard all local unpublished repositories. Use this with caution as your local unpublished repositories cannot be restored unless you have a backup copy.
304
+
`mbed update --ignore` - update the current program or library and its dependencies, and ignore any local unpublished libraries (they won't be deleted or modified, just ignored).
299
305
300
306
__Combining update options__
301
307
302
308
You can combine the options above for the following scenarios:
303
309
304
-
`mbed update --clean --ignore` - update the current program or library and its dependencies, but ignore any local repositories. mbed-cli will update whatever it can from public repositories.
310
+
`mbed update --clean --clean-deps --clean-files` - update the current program or library and its dependencies, remove all local unpublished libraries, discard local uncommitted changes, and remove all untracked or ignored files. This wipes every single change that you made in the source tree and restores the stock layout.
305
311
306
-
`mbed update --clean --force` - update the current program or library and all its dependencies, and restore my source tree to stock layout. This wipes every change that you made in the source tree that didn't belong to the original commit, including uncommitted changes and unpublished local libraries.
312
+
`mbed update --clean --ignore` - update the current program or library and its dependencies, but ignore any local repositories. mbed CLI will update whatever it can from the public repositories.
307
313
308
314
Use these with caution as your uncommitted changes and unpublished libraries cannot be restored.
309
315
@@ -382,8 +388,8 @@ Through the workflow explained above, mbed CLI will maintain association to the
382
388
383
389
After importing a program or creating a new one, you need to tell *mbed CLI* where to find the toolchains that you want to use for compiling your source tree. *mbed CLI* gets this information from a file named `mbed_settings.py`, which is automatically created at the top of your cloned repository (if it doesn't already exist). As a rule, since `mbed_settings.py` contains local settings (possibly relevant only to a single OS on a single machine), it should not be versioned. In this file:
384
390
385
-
* If you want to use the [ARM Compiler toolchain](https://developer.arm.com/products/software-development-tools/compilers/arm-compiler-5/downloads), set ``ARM_PATH`` to the *base* directory of your ARMCC installation (example: c:\software\armcc5.06). The recommended version of the ARMCC toolchain is 5.06 (5.05 will very likely work too).
386
-
* If you want to use the [GCC ARM Embedded toolchain](https://launchpad.net/gcc-arm-embedded), set ``GCC_ARM_PATH`` to the *binary* directory of your GCC ARM installation (example: c:\software\GNUToolsARMEmbedded\4.82013q4\bin). Use versions 4.8 or 4.9 of GCC ARM Embedded, but version 5.0 or any version above might be incompatible with the tools.
391
+
* If you want to use the [ARM Compiler toolchain](https://developer.arm.com/products/software-development-tools/compilers/arm-compiler-5/downloads), set `ARM_PATH` to the *base* directory of your ARMCC installation (example: c:\software\armcc5.06). The recommended version of the ARMCC toolchain is 5.06 (5.05 will very likely work too).
392
+
* If you want to use the [GCC ARM Embedded toolchain](https://launchpad.net/gcc-arm-embedded), set `GCC_ARM_PATH` to the *binary* directory of your GCC ARM installation (example: c:\software\GNUToolsARMEmbedded\4.82013q4\bin). Use versions 4.8 or 4.9 of GCC ARM Embedded, but version 5.0 or any version above might be incompatible with the tools.
387
393
388
394
#### Compiling your program
389
395
@@ -511,7 +517,7 @@ ___Macros___
511
517
512
518
You can specify macros in your command line using the -D option. For example:
Using ``mbed target <target>`` and ``mbed toolchain <toolchain>`` you can set the default target and toolchain for your program, meaning you won't have to specify these every time you compile or generate IDE project files.
535
+
Using `mbed target <target>` and `mbed toolchain <toolchain>` you can set the default target and toolchain for your program, meaning you won't have to specify these every time you compile or generate IDE project files.
530
536
531
537
### Exporting to desktop IDEs
532
538
@@ -538,7 +544,7 @@ For example, to export to uVision run:
538
544
$ mbed export -i uvision -m K64F
539
545
```
540
546
541
-
A ``.uvproj`` file is created in the projectfiles/uvision folder. You can open the project file with uVision.
547
+
A `.uvproj` file is created in the projectfiles/uvision folder. You can open the project file with uVision.
542
548
543
549
### Testing
544
550
@@ -659,7 +665,7 @@ Test code exists in the following directory structure:
659
665
660
666
```
661
667
mbed-os-program
662
-
|- main.cpp # Optional main.cpp with ```main()``` if it is an application module.
668
+
|- main.cpp # Optional main.cpp with main() if it is an application module.
0 commit comments