Skip to content

Commit 36df9d1

Browse files
authored
Merge pull request #13946 from jainvikas8/update-mbed-cli-2-cmds
Update to reflect Mbed CLI 2 changes
2 parents 9f18c44 + 8b70ae1 commit 36df9d1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

docs/design-documents/tools/cmake.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CMake Mbed OS
22

33
Requirements:
4-
- CMake 3.18.2 and higher
4+
- CMake 3.19.0 and higher
55
- `mbed-tools` (python 3.6 and higher)
66

77
Two steps approach:
@@ -75,7 +75,7 @@ The rule of thumb is to not expose header files that are internal. We would like
7575

7676
`mbed-tools` consolidates all of the required modules to build Mbed OS, along with the command line interface, into a single Python package which can be installed using standard Python packaging tools.
7777

78-
Each application contains a top-level CMakeLists.txt file. The `mbedtools init` command can create this top-level CMakeLists.txt, or a user can create it manually. Each application also has a number of json configuration files. `mbedtools configure` creates an Mbed configuration CMake file (`.mbedbuild/mbed_config.cmake`). The process for building an application looks like:
78+
Each application contains a top-level CMakeLists.txt file. The `mbedtools new` command can create this top-level CMakeLists.txt, or a user can create it manually. Each application also has a number of json configuration files. `mbedtools configure` creates an Mbed configuration CMake file (`.mbedbuild/mbed_config.cmake`). The process for building an application looks like:
7979

8080
1. Parse the arguments provided to build command
8181
1. Parse the application configuration

tools/cmake/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Supported examples can be identified by the presence of a top level `CMakeLists.
4848

4949
Prerequisities:
5050
- CMake >=3.19.0
51-
- mbed-tools >=3.5.0
51+
- mbed-tools >=4.0.0
5252

5353
From the application root or wherever `mbed-os.lib` is found, run the following command to:
5454
* create the Mbed OS configuration CMake module
@@ -57,15 +57,15 @@ From the application root or wherever `mbed-os.lib` is found, run the following
5757
* build the project using the `Ninja` build system
5858

5959
```
60-
mbedtools build -m <mbed-target> -t <toolchain>
60+
mbedtools compile -m <mbed-target> -t <toolchain>
6161
```
6262
6363
`CMAKE_BUILD_TYPE` can overridden with Mbed specific values: `Develop` (default value), `Release` and `Debug`.
6464
65-
`mbed-tools` will pass `-DCMAKE_BUILD_TYPE=<supported-build-type>` for you when using the `--build-type` optional argument of the `build` subcommand as follows:
65+
`mbed-tools` will pass `-DCMAKE_BUILD_TYPE=<supported-build-type>` for you when using the `--build-type` optional argument of the `build` subcommand as follows:
6666
6767
```
68-
mbedtools build -m <mbed-target> -t <toolchain> -b <supported-build-type>
68+
mbedtools compile -m <mbed-target> -t <toolchain> -b <supported-build-type>
6969
```
7070
7171
If you're running CMake directly, you may need to pass it in yourself as follows:

tools/test/examples/examples_lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def compile_repos(config, toolchains, targets, profiles, verbose, exp_filter, cm
383383
logging.info("Compiling %s" % summary_string)
384384

385385
if cmake:
386-
build_command_seq = ["mbed-tools build -t {} -m {} -c".format(toolchain, target)]
386+
build_command_seq = ["mbed-tools compile -t {} -m {} -c".format(toolchain, target)]
387387
else:
388388
build_command_seq = ["mbed-cli compile -t {} -m {} -j {} {}".format(toolchain, target, str(jobs), '-vv' if verbose else '') ]
389389
if profiles:

0 commit comments

Comments
 (0)