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: docs/tools/CLI/cli-setup/cli-reqs.md
+11-20Lines changed: 11 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -198,14 +198,9 @@ You must inform Mbed CLI about the location of your compiler using one of the fo
198
198
- The Mbed CLI configuration command.
199
199
- Adding the compiler's directory to your PATH.
200
200
- Setting an environment variable.
201
-
- The `mbed_settings.py` file in the root of your program. The tools<!--which tools?--> will automatically create this file if it doesn't already exist.
202
201
203
202
<span class="tips">**Tip:** You may configure more than one toolchain. However, you may only use one toolchain at a time. For more information, see [the multiple toolchains section below](#optional-configuring-multiple-toolchains)</span>
204
203
205
-
<!--this comment should be in the index page with the other tool information, if at all.
206
-
When using C++98 and GNU C99, the only difference between the toolchains is performance.
207
-
-->
208
-
209
204
#### Method 1: Mbed CLI configuration
210
205
211
206
Mbed CLI stores its own configuration about compiler locations in both project local settings and user wide global settings. You may set and view these settings with the `mbed config` command. For example, set the Arm Compiler 5 location for your user with the command:
The `-G` switch tells Mbed CLI to set this as a global setting, allowing all projects your user owns to compile with Arm Compiler 5. If you want only a local setting for `ARM_PATH`, omit the `-G` switch.
219
214
220
-
Mbed CLI supports a setting for each toolchain path. Below is a list of these settings, along with a description of what path is expected in each setting:
215
+
Mbed CLI supports a setting for each toolchain path:
216
+
217
+
| Toolchain | Example binary location | Setting name | Example path |
<!--this strikes me as using way more words than it needs to-->
223
-
- `ARM_PATH`: The path to the *base* directory of your Arm Compiler 5 installation. This should be the directory containing the binaries for `armcc`. For example, if your Arm Compiler 5 executable `armcc` is located at `/home/redacted/ARM_Compiler_5.06u5/bin/armcc`, you set `ARM_PATH` to `/home/redacted/ARM_Compiler_5.06u5`
224
-
- `ARMC6_PATH`: The path to the *binary* directory of your Arm Compiler 6 installation. This should be the directory containing the binaries for `armclang`. For example, if your Arm Compiler 6 executable `armclang` is located at `C:/Program Files/ARM/armcc6.10/bin/armclang`, you set `ARMC6_PATH` to `C:/Program Files/ARM/armcc6.10/bin`
225
-
- `IAR_PATH`: The path to the *base* directory of your IAR EWARM Compiler installation. This should be the directory containing the binaries for `iccarm`. For example, if your IAR EWARM compiler executable is located at `C:/Program Files/IAR Systems/Embedded Workbench 7.5/arm/bin/iccarm.exe`, you set `IAR_PATH` to `C:/Program Files/IAR Systems/Embedded Workbench 7.5/arm`.
226
-
- `GCC_ARM_PATH`: The path to the *binary* directory of your GCC Arm Embedded Compiler installation. This should be the directory containing the binaries for `arm-none-eabi-gcc`. For example, if your GCC Arm Embedded toolchain gcc<!--did we mean to use gcc twice in this sentence?--> executable is in `/usr/bin/arm-none-eabi-gcc`, you set `GCC_ARM_PATH` to `/usr/bin`.
224
+
#### Method 2: setting the system PATH
227
225
228
-
#### Method 2: setting the PATH
226
+
The `mbed compile` command checks your system `PATH` for an executable that the toolchain setting specifies. This is the same check that a shell would perform to find the executable on the command-line. `mbed compile` uses absolute path names for every toolchain except `GCC_ARM`.
229
227
230
-
The `mbed compile` command checks your `PATH` for an executable that is part of the compiler suite in question<!-- what does "in question" mean? that it was part of the compilation command?-->. This check is the same as a shell would perform to find the executable on the command-line. When `mbed compile` finds the executable it is looking for, it prefaces the executable name with the path it found. Mbed CLI does not prefix any executable found for `GCC_ARM`.<!--so what do I do in this section - set paths? This feels more like background info than instructions. And is the GCC_ARM thing part of the previous sentence, or in contradiction? what should I do with GCC_ARM, if it's in contradiction?-->
228
+
<!--so what do I do in this section - set paths? This feels more like background info than instructions. And is the GCC_ARM thing part of the previous sentence, or in contradiction? what should I do with GCC_ARM, if it's in contradiction?-->
231
229
232
230
#### Method 3: environment variable
233
231
234
232
Mbed CLI detects compilers with specially named environment variables. These environment variables are the same as their corresponding configuration <!--where is the corresponding configuration variable?-->variable, with a prefix of `MBED_` added. For example, when configuring Arm Compiler 5, you set the `MBED_ARM_PATH` environment variable to the base directory of your Arm Compiler 5 installation.<!--what do I actually do in this section? And is it a standalone, or does it go with something else (since you used "also" I'm not sure)-->
235
233
236
-
#### Method 4: editing mbed_settings.py
237
-
238
-
Mbed CLI uses `mbed_settings.py` to configure toolchains. This file must be a Python module, and uses the exact same configuration variables as the Mbed CLI configuration.<!--maybe they should be methods 1 and 2, then, rather than 1 and 4-->
239
-
<!--what do I do in this? there are no instructions here, and no link to anywhere else-->
240
-
241
-
<span class="notes">**Note:** 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.</span>
242
-
243
234
#### Optional: configuring multiple toolchains
244
235
245
236
All the settings described in the previous sections can configure a different version of the same toolchain, and Mbed CLI has a set of rules to seamlessly switch between these versions for an individual `mbed compile` or `mbed test` invocation. Mbed CLI picks the most specific version, from most specific to least specific, in this order:
0 commit comments