Skip to content

Commit 0863d4f

Browse files
committed
Merge pull request #172 from ARMmbed/config_fixes
Improvements to 'mbed config'
2 parents 0d5afb9 + 6bc6c78 commit 0863d4f

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ This document covers the installation and usage of *mbed CLI*.
2626
2. [Compiling your program](#compiling-your-program)
2727
3. [Compiling static libraries](#compiling-static-libraries)
2828
4. [Compiling tests](#compiling-tests)
29+
5. [Automating toolchain and target selection](#automating-toolchain-and-target-selection)
30+
6. [Customizing the build](#customizing-the-build)
31+
7. [Inspecting configuration](#inspecting-configuration)
2932
1. [Exporting to desktop IDEs](#exporting-to-desktop-ides)
3033
1. [Known limitations](#known-limitations)
3134

@@ -449,6 +452,37 @@ $ mbed compile -t GCC_ARM -m K64F -j 0 -o debug-info
449452
<span class="tips">**Tip:** If you have files that you want to compile only in release mode, put them in a directory called `TARGET_RELEASE` at any level of your tree. If you have files that you want to compile only in debug mode, put them in a directory called `TARGET_DEBUG` at any level of your tree (then use `-o debug-info` as explained above).
450453
</span>
451454

455+
___The configuration system___
456+
457+
The [mbed configuration system](https://github.com/ARMmbed/mbed-os/blob/master/docs/config_system.md) provides a flexible mechanism for configuring the mbed application, its libraries and the build target. Refer to the previous link for more details about the configuration system.
458+
459+
#### Inspecting configuration
460+
461+
If the [mbed configuration system](https://github.com/ARMmbed/mbed-os/blob/master/docs/config_system.md) is used by the program, the configuration can be displayed using `mbed config`:
462+
463+
```
464+
$ mbed config -t GCC_ARM -m K64F
465+
```
466+
467+
To display more verbose information about the configuration parameters, use `-v`:
468+
469+
```
470+
$ mbed config -t GCC_ARM -m K64F -v
471+
```
472+
473+
It's possible to filter the output of `mbed config` by specifying one or more prefixes for the configuration parameters that will be displayed. For example, to display only the configuration defined by the targets:
474+
475+
```
476+
$ mbed config -t GCC_ARM -m K64F --prefix target
477+
```
478+
479+
`--prefix` can be used more than once. To display only the configuration defined by the application and the targets, use two `--prefix` options:
480+
481+
482+
```
483+
$ mbed config -t GCC_ARM -m K64F --prefix target --prefix app
484+
```
485+
452486
### Exporting to desktop IDEs
453487

454488
If you need to debug your code, a good way to do that is to export your source tree to an IDE project file, so that you can use the IDE's debugging facilities. Currently *mbed-cli* supports exporting to Keil uVision, DS-5, IAR Workbench, Simplicity Studio and other IDEs.

mbed/mbed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1862,7 +1862,7 @@ def config(toolchain=None, mcu=None, source=False, prefix=None):
18621862
tools_dir = os.path.abspath(mbed_tools_path)
18631863

18641864
if not os.path.isfile(os.path.join(tools_dir, 'get_config.py')):
1865-
error("'get_config_py' not found in tools/. Please update your mbed-os clone.", -1)
1865+
error("'get_config_py' not found in tools/. Please update mbed-os to get the latest tools.", -1)
18661866

18671867
target = mcu if mcu else program.get_cfg('TARGET')
18681868
if target is None:

0 commit comments

Comments
 (0)