Skip to content

Commit efe530e

Browse files
committed
Add documentation regarding target awareness
1 parent a632631 commit efe530e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ Image: BUILD/K64F/GCC_ARM/mbed-os-program.bin
344344

345345
The arguments for *compile* are:
346346

347-
* `-m <MCU>` to select a target.
347+
* `-m <MCU>` to select a target. If 'detect' or 'auto' parameter is passed then mbed CLI will attempt to detect the connected target and compile against it.
348348
* `-t <TOOLCHAIN>` to select a toolchain (of those defined in `mbed_settings.py`, see above). The value can be either `ARM` (ARM Compiler 5), `GCC_ARM` (GNU ARM Embedded), or `IAR` (IAR Embedded Workbench for ARM).
349349
* `--source <SOURCE>` to select the source directory. The default is `.` (the current directorty). You can specify multiple source locations, even outside the program tree.
350350
* `--build <BUILD>` to select the build directory. Default: `BUILD/` inside your program.
@@ -443,6 +443,8 @@ $ mbed compile -t GCC_ARM -m K64F --profile mbed-os/tools/profiles/debug.json
443443

444444
Using `mbed target <target>` and `mbed toolchain <toolchain>` you can set the default target and toolchain for your program, meaning you won't have to specify these every time you compile or generate IDE project files.
445445

446+
You can also use `mbed target detect', which will attempt to detect the connected target board and use it as parameter every time you compile or export.
447+
446448

447449
## Exporting to desktop IDEs
448450

@@ -501,7 +503,7 @@ mbedgt: completed in 21.28 sec
501503
```
502504

503505
The arguments to `test` are:
504-
* `-m <MCU>` to select a target for the compilation.
506+
* `-m <MCU>` to select a target for the compilation. If 'detect' or 'auto' parameter is passed then mbed CLI will attempt to detect the connected target and compile against it.
505507
* `-t <TOOLCHAIN>` to select a toolchain (of those defined in `mbed_settings.py`, see above), where `toolchain` can be either `ARM` (ARM Compiler 5), `GCC_ARM` (GNU ARM Embedded), or `IAR` (IAR Embedded Workbench for ARM).
506508
* `--compile-list` to list all the tests that can be built
507509
* `--run-list` to list all the tests that can be ran (they must be built first)

0 commit comments

Comments
 (0)