Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions docs/tools/mbed_cli_2/use.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ The Mbed OS configuration system parses the configuration files in your project

```
mbed-tools configure -m K64F -t GCC_ARM
mbed_config.cmake has been generated and written to '/Users/UserName/Development/Blinky/.mbedbuild'
mbed_config.cmake has been generated and written to '/Users/UserName/Development/Blinky/cmake_build/K64F/develop/GCC_ARM/mbed_config.cmake'
```

## Build the project
Expand Down Expand Up @@ -186,20 +186,30 @@ Example for FRDM-K64F and GCC:
mbed-tools compile -m K64F -t GCC_ARM
```

### Building for multiple targets

You can build an Mbed project for multiple targets, with different profiles and toolchains, without affecting other builds. The `compile` subcommand will create and build into a different subdirectory for each combination:

```
cmake_build/<target>/<profile>/<toolchain>/
```

## Iterative builds on configured projects

To perform an iterative build on a previously configured project:
If you have already made a build for the Mbed target and toolchain that you're using, `compile` will perform an iterative build.

To force a rebuild of the project for a target and toolchain, include the --clean argument:

```
mbed-tools compile
mbed-tools compile -m <target> -t <toolchain> --clean
```

## Flashing the built program

You can flash the built program to the connected target by adding the -f/--flash argument to the compile command:

```
mbed-tools compile -f
mbed-tools compile -m <target> -t <toolchain> -f
```

## Opening a serial terminal
Expand Down