Skip to content

Commit 97e259d

Browse files
committed
CMake: add Readme - how to build and the current state of art
1 parent d0280ec commit 97e259d

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

cmake/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## CMake for Mbed OS
2+
3+
Until further notice, CMake for Mbed OS is still in the development.
4+
5+
### Supported targets
6+
7+
Only a limited set of targets is supported at the moment.
8+
9+
These targets should work:
10+
- K64F
11+
- DISCO_L475VG_IOT01A
12+
- NRF52840_DK
13+
- WIO_3G
14+
- K66F
15+
16+
### Supported toolchains
17+
18+
Arm Compiler 6 and GNU Arm Embedded toolchains are supported.
19+
20+
### Examples
21+
22+
Supported examples can be identified by the presence of a top level `CMakelists.txt` input source file.
23+
24+
### Known issues
25+
26+
- ARMClang6: the assembler does not include definitions. It will be fixed in the upcoming release (>3.18.2). Reference: https://gitlab.kitware.com/cmake/cmake/-/issues/21148#note_823305
27+
- Ninja: ARMClang6 response files require unix paths on Windows. Reference: https://gitlab.kitware.com/cmake/cmake/-/issues/21093
28+
29+
## How to build an application
30+
31+
Prerequisities:
32+
- CMake >=3.18.2
33+
- mbed-tools >=3.2.0
34+
35+
From the application root run the following:
36+
1. To create the Mbed OS configuration CMake module, from the root of the application or wherever `mbed-os.lib` is found:
37+
38+
```
39+
mbedtools configure -m target_name -t toolchain_name
40+
```
41+
42+
1. Run the following command to create a build directory, generate the project configuration and build the project using `Ninja`:
43+
44+
```
45+
mkdir build && cd build && cmake .. -GNinja && cmake --build .
46+
```
47+

0 commit comments

Comments
 (0)