Skip to content

Commit 78d2044

Browse files
authored
Merge pull request #221 from screamerbg/development
mbed CLI 0.7.x fixes
2 parents 79d4eb0 + 7d584ab commit 78d2044

File tree

3 files changed

+92
-71
lines changed

3 files changed

+92
-71
lines changed

README.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,27 @@ This document covers the installation and usage of *mbed CLI*.
5858

5959
You can get the latest stable version of *mbed CLI* via PyPI by running:
6060

61-
``$ pip install mbed-cli``
61+
```
62+
$ pip install mbed-cli
63+
```
6264

6365
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):
6466

65-
``$ git clone https://github.com/ARMmbed/mbed-cli``
67+
`$ git clone https://github.com/ARMmbed/mbed-cli`
6668

6769
Once cloned you can install *mbed CLI* as a python package:
6870

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)
7072

7173
<span class="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>
7274

7375
### Uninstalling mbed CLI
7476

7577
To uninstall *mbed CLI*, simply run:
7678

77-
``pip uninstall mbed-cli``
79+
```
80+
pip uninstall mbed-cli
81+
```
7882

7983
## Using mbed CLI
8084

@@ -291,19 +295,21 @@ Run `mbed update <tag_name|revision> --clean`
291295

292296
__When you have unpublished local libraries__
293297

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:
295299

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.
297303

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).
299305

300306
__Combining update options__
301307

302308
You can combine the options above for the following scenarios:
303309

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.
305311

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.
307313

308314
Use these with caution as your uncommitted changes and unpublished libraries cannot be restored.
309315

@@ -382,8 +388,8 @@ Through the workflow explained above, mbed CLI will maintain association to the
382388

383389
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:
384390

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.
387393

388394
#### Compiling your program
389395

@@ -511,7 +517,7 @@ ___Macros___
511517

512518
You can specify macros in your command line using the -D option. For example:
513519

514-
``$ mbed compile -t GCC_ARM -m K64F -c -DUVISOR_PRESENT``
520+
`$ mbed compile -t GCC_ARM -m K64F -c -DUVISOR_PRESENT`
515521

516522
___Compiling in debug mode___
517523

@@ -526,7 +532,7 @@ $ mbed compile -t GCC_ARM -m K64F -o debug-info
526532

527533
#### Automating toolchain and target selection
528534

529-
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.
530536

531537
### Exporting to desktop IDEs
532538

@@ -538,7 +544,7 @@ For example, to export to uVision run:
538544
$ mbed export -i uvision -m K64F
539545
```
540546

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.
542548

543549
### Testing
544550

@@ -659,7 +665,7 @@ Test code exists in the following directory structure:
659665

660666
```
661667
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.
663669
|- pqr.lib # Required libs
664670
|- xyz.lib
665671
|- mbed-os

0 commit comments

Comments
 (0)