Skip to content

Commit 97c7a38

Browse files
committed
CMake: Specify mbedtools in the build instructions
mbedtools provides a more user friendly UX for building application.
1 parent 22d926f commit 97c7a38

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

tools/cmake/README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,27 @@ Supported examples can be identified by the presence of a top level `CMakelists.
4343

4444
Prerequisities:
4545
- CMake >=3.19.0
46-
- mbed-tools >=3.4.0
46+
- mbed-tools >=3.5.0
4747

48-
From the application root or wherever `mbed-os.lib` is found:
49-
1. Run the following command to create the Mbed OS configuration CMake module:
48+
From the application root or wherever `mbed-os.lib` is found, run the following command to:
49+
* create the Mbed OS configuration CMake module
50+
* create a build directory
51+
* generate the project configuration
52+
* build the project using the `Ninja` build system
5053

5154
```
52-
mbedtools configure -m <mbed-target> -t <toolchain>
55+
mbedtools build -m <mbed-target> -t <toolchain>
5356
```
5457
55-
1. Run the following command to create a build directory, generate the project configuration and build the project using `Ninja`:
58+
`CMAKE_BUILD_TYPE` can overridden with Mbed specific values: `Develop` (default value), `Release` and `Debug`.
5659
57-
```
58-
mkdir build && cd build && cmake .. -GNinja && cmake --build .
59-
```
60+
`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:
6061
61-
The default build type is `Develop`. Use `CMAKE_BUILD_TYPE` to select `Develop`, `Release` or `Debug` as follows:
62+
```
63+
mbedtools build -m <mbed-target> -t <toolchain> -b <supported-build-type>
64+
```
6265
66+
If you're running CMake directly, you may need to pass it in yourself as follows:
6367
```
64-
cmake .. -GNinja -DCMAKE_BUILD_TYPE=<supported-build-type> && cmake --build .
68+
cmake -S <source-dir> -B <build-dir> -DCMAKE_BUILD_TYPE=debug
6569
```

0 commit comments

Comments
 (0)