From 8b70ae1d83bb79ba2f9cb9af7bb380e9934936e2 Mon Sep 17 00:00:00 2001 From: Vikas Katariya Date: Mon, 23 Nov 2020 14:48:16 +0000 Subject: [PATCH] docs: Update to reflect Mbed CLI 2 changes Due to the recent release of Mbed CLI 2, the command line options have been renamed to ensure good usability and harmonize with the old tools. These are the following changes done: * Minimum Cmake - 3.19.0 is required * Minimum Mbed-tools - 4.0.0 is required * mbed-tools cmd `init` to `new` * mbed-tools cmd `build` to `compile` * Removed whitespaces --- docs/design-documents/tools/cmake.md | 4 ++-- tools/cmake/README.md | 8 ++++---- tools/test/examples/examples_lib.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/design-documents/tools/cmake.md b/docs/design-documents/tools/cmake.md index 2c700ceb5a..230d4c502c 100644 --- a/docs/design-documents/tools/cmake.md +++ b/docs/design-documents/tools/cmake.md @@ -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: @@ -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 diff --git a/tools/cmake/README.md b/tools/cmake/README.md index 6728b667bd..f78ac14922 100644 --- a/tools/cmake/README.md +++ b/tools/cmake/README.md @@ -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 @@ -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 -t + mbedtools compile -m -t ``` `CMAKE_BUILD_TYPE` can overridden with Mbed specific values: `Develop` (default value), `Release` and `Debug`. -`mbed-tools` will pass `-DCMAKE_BUILD_TYPE=` for you when using the `--build-type` optional argument of the `build` subcommand as follows: +`mbed-tools` will pass `-DCMAKE_BUILD_TYPE=` for you when using the `--build-type` optional argument of the `build` subcommand as follows: ``` -mbedtools build -m -t -b +mbedtools compile -m -t -b ``` If you're running CMake directly, you may need to pass it in yourself as follows: diff --git a/tools/test/examples/examples_lib.py b/tools/test/examples/examples_lib.py index 07d3526b09..a7b455fdbb 100644 --- a/tools/test/examples/examples_lib.py +++ b/tools/test/examples/examples_lib.py @@ -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: