Skip to content

Commit 5eb3d48

Browse files
authored
Merge pull request #499 from yennster/toolchains
README.md: Note regarding ARMC5 & added IAR usage details
2 parents aeabe03 + 5836eb3 commit 5eb3d48

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

README.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,15 @@ The directories of Git and Mercurial executables (`git` and `hg`) need to be in
6666
* Compilers: GCC ARM, ARM Compiler 5, IAR.
6767
* IDE: Keil uVision, DS-5, IAR Workbench.
6868

69-
### Video tutorial for manual installation
69+
<span class="tips">**Note:** When installing the ARM Compiler 5 on a 64-bit Linux machine, you may need to also install the i386 architecture package:</span>
70+
71+
```
72+
$ sudo dpkg --add-architecture i386
73+
$ sudo apt-get update
74+
$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
75+
```
76+
77+
### Video tutorial for manual installation
7078

7179
<span class="images">[![Video tutorial](http://img.youtube.com/vi/cM0dFoTuU14/0.jpg)](https://www.youtube.com/watch?v=cM0dFoTuU14)</span>
7280

@@ -134,7 +142,7 @@ mbed CLI can create and import programs based on both mbed OS 2 and mbed OS 5.
134142

135143
### Creating a new program for mbed OS 5
136144

137-
When you create a new program, mbed CLI automatically imports the latest [mbed OS release](https://github.com/ARMmbed/mbed-os/). Each release includes all the components: code, build tools and IDE exporters.
145+
When you create a new program, mbed CLI automatically imports the latest [mbed OS release](https://github.com/ARMmbed/mbed-os/). Each release includes all the components: code, build tools and IDE exporters.
138146

139147
With this in mind, let's create a new program (we'll call it `mbed-os-program`):
140148

@@ -200,13 +208,13 @@ $ cd mbed-os-example-blinky
200208
```
201209

202210
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:
203-
211+
204212
```
205213
$ mbed import mbed-os-example-blinky
206214
```
207215

208216
is equivalent to this command:
209-
217+
210218
```
211219
$ mbed import https://github.com/ARMmbed/mbed-os-example-blinky
212220
```
@@ -228,7 +236,7 @@ $ mbed new .
228236

229237
## Adding and removing libraries
230238

231-
While working on your code, you may need to add another library to your application or remove existing libraries.
239+
While working on your code, you may need to add another library to your application or remove existing libraries.
232240

233241
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.
234242

@@ -273,7 +281,7 @@ $ mbed remove text-lcd
273281
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.
274282

275283
There are multiple ways to configure toolchain locations:
276-
* `mbed_settings.py` file in the root of your program. The tools will automatically create this file if it doesn't already exist.
284+
* `mbed_settings.py` file in the root of your program. The tools will automatically create this file if it doesn't already exist.
277285
* The mbed CLI configuration.
278286
* Setting an environment variable.
279287
* Adding directory of the compiler binary to your PATH.
@@ -286,9 +294,9 @@ Edit `mbed_settings.py` to set your toolchain:
286294

287295
* 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 ARM Compiler installation (example: C:\Program Files\ARM\armcc5.06). The recommended version of the ARM Compiler toolchain is 5.06.
288296
* To use the [GNU ARM Embedded toolchain (GCC) version 6](https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads), set `GCC_ARM_PATH` to the *binary* directory of your GCC ARM installation (example: C:\Program Files\GNU Tools ARM Embedded\6 2017q2\bin). Use version 6 of GCC ARM Embedded; version 5.0 or any older version might be incompatible with the tools.
289-
* To use the [IAR EWARM toolhain](https://www.iar.com/iar-embedded-workbench/#!?architecture=ARM), set `IAR_PATH` to the *base* directory of your IAR installation. Use versions 7.80 of IAR EWARM; prior versions might be incompatible with the tools.
297+
* To use the [IAR EWARM toolchain](https://www.iar.com/iar-embedded-workbench/#!?architecture=ARM), set `IAR_PATH` to the *base* directory of your IAR installation (example: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm). Use version 7.80.x of the IAR EWARM; newer (or older) versions might be incompatible with the tools.
290298

291-
Because `mbed_settings.py` contains local settings (possibly relevant only to a single OS on a single machine), you should not check it into version control.
299+
Because `mbed_settings.py` contains local settings (possibly relevant only to a single OS on a single machine), you should not check it into version control.
292300

293301
#### Through mbed CLI configuration
294302

@@ -643,7 +651,7 @@ As shown above, tests exist inside `TESTS\testgroup\testcase\` directories. Plea
643651

644652
### Checking status
645653

646-
As you develop your program, you'll edit parts of it. You can get the status of all the repositories in your program (recursively) by running `mbed status`. If a repository has uncommitted changes, this command displays these changes.
654+
As you develop your program, you'll edit parts of it. You can get the status of all the repositories in your program (recursively) by running `mbed status`. If a repository has uncommitted changes, this command displays these changes.
647655

648656
Here's an example:
649657

@@ -669,7 +677,7 @@ You can then commit or discard these changes through that repository's version c
669677

670678
### Pushing upstream
671679

672-
To push the changes in your local tree upstream, run `mbed publish`. `mbed publish` works recursively, pushing the leaf dependencies first, then updating the dependents and pushing them too.
680+
To push the changes in your local tree upstream, run `mbed publish`. `mbed publish` works recursively, pushing the leaf dependencies first, then updating the dependents and pushing them too.
673681

674682
Let's assume that the list of dependencies of your program (obtained by running `mbed ls`) looks like this:
675683

@@ -688,12 +696,12 @@ Let's assume that you make changes to `iot-client`. `mbed publish` detects the c
688696
When you create a new (local) version control managed program or library, its revision history exists only locally. The repository is not associated with the remote one. To publish the local repository, please follow these steps:
689697

690698
1. Create a new empty repository on the remote site. This can be on a public repository hosting service (GitHub, Bitbucket, mbed.org), your own service or a different location on your system.
691-
1. Copy the URL/location of the new repository in your clipboard.
699+
1. Copy the URL/location of the new repository in your clipboard.
692700
1. Open command-line in the local repository directory (for example, change directory to `mbed-os-example/local-lib`).
693701
1. To associate the local repository:
694702
* For Git, run `git remote add origin <url-or-paht-to-your-remote-repo>`.
695703
* For Mercurial, edit .hg/hgrc and add (or replace if exists):
696-
704+
697705
```
698706
[paths]
699707
default = <url-or-paht-to-your-remote-repo>
@@ -717,7 +725,7 @@ Through the workflow explained above, mbed CLI maintains association to the orig
717725

718726
## Updating programs and libraries
719727

720-
You can update programs and libraries on your local machine so that they pull in changes from the remote sources (Git or Mercurial).
728+
You can update programs and libraries on your local machine so that they pull in changes from the remote sources (Git or Mercurial).
721729

722730
As with any mbed CLI command, `mbed update` uses the current directory as a working context. Before calling `mbed update`, you should change your working directory to the one you want to update. For example, if you're updating mbed-os, use `cd mbed-os` before you begin updating.
723731

@@ -800,7 +808,7 @@ Here is a list of configuration settings and their defaults:
800808
* `protocol` - defines the default protocol used for importing or cloning of programs and libraries. The possible values are `https`, `http` and `ssh`. Use `ssh` if you have generated and registered SSH keys (Public Key Authentication) with a service such as GitHub, GitLab, Bitbucket and so on. Read more about SSH keys [here](https://help.github.com/articles/generating-an-ssh-key/). Default: `https`.
801809
* `depth` - defines the *clone* depth for importing or cloning and applies only to *Git* repositories. Note that though this option may improve cloning speed, it may also prevent you from correctly checking out a dependency tree when the reference revision hash is older than the clone depth. Read more about shallow clones [here](https://git-scm.com/docs/git-clone). Default: none.
802810
* `cache` - defines the local path that stores small copies of the imported or cloned repositories, and mbed CLI uses it to minimize traffic and speed up future imports of the same repositories. Use `on` or `enabled` to turn on caching in the system temp path. Use `none` to turn caching off. Default: none (disabled).
803-
811+
804812
## Troubleshooting
805813

806814
### Unable to import Mercurial (mbed.org) programs or libraries.

0 commit comments

Comments
 (0)