Skip to content

Update to reflect Mbed CLI 2 changes #13946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/design-documents/tools/cmake.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CMake Mbed OS

Requirements:
- CMake 3.18.2 and higher
- CMake 3.19.0 and higher
- `mbed-tools` (python 3.6 and higher)

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

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

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

1. Parse the arguments provided to build command
1. Parse the application configuration
Expand Down
8 changes: 4 additions & 4 deletions tools/cmake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Supported examples can be identified by the presence of a top level `CMakeLists.

Prerequisities:
- CMake >=3.19.0
- mbed-tools >=3.5.0
- mbed-tools >=4.0.0

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

```
mbedtools build -m <mbed-target> -t <toolchain>
mbedtools compile -m <mbed-target> -t <toolchain>
```

`CMAKE_BUILD_TYPE` can overridden with Mbed specific values: `Develop` (default value), `Release` and `Debug`.

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

```
mbedtools build -m <mbed-target> -t <toolchain> -b <supported-build-type>
mbedtools compile -m <mbed-target> -t <toolchain> -b <supported-build-type>
```

If you're running CMake directly, you may need to pass it in yourself as follows:
Expand Down
2 changes: 1 addition & 1 deletion tools/test/examples/examples_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def compile_repos(config, toolchains, targets, profiles, verbose, exp_filter, cm
logging.info("Compiling %s" % summary_string)

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