mbed target requires an exact name match for a target, but does not provide a mechanism for listing available targets.
@bremoran Available targets for? Compiling or exporting?
Compiling: mbed compile --supported (https://github.com/ARMmbed/mbed-cli#compiling-your-program)
Exporting: mbed export --supported (not listed under https://github.com/ARMmbed/mbed-cli#exporting-to-desktop-ides. I'll add it to the documentation soon)
That feature should probably be mirrored in mbed target
Without a target set, mbed compile directs you to mbed target, which does not provide an API for getting a list of supported targets.
mbed target --help
usage: mbed target [-h] [-G] [-v] [-vv] [name]
This is an alias to 'mbed config target [--global] [name]'
positional arguments:
name Default target name. Example: K64F, NUCLEO_F401RE,
NRF51822...
optional arguments:
-h, --help show this help message and exit
-G, --global Use global settings, not local
-v, --verbose Verbose diagnostic output
-vv, --very_verbose Very verbose diagnostic output
Note that targets vs IDEs and targets vs toolchains might have different level of support. While we strive to support all targets across toolchains, currently that's not the case.
Keil for example supports all targets, but gcc make relies on a template for a specific target, etc, etc. Refer to https://github.com/mbedmicro/mbed to extend the targets support list for either toolchains or IDEs
Now implemented
Most helpful comment
@bremoran Available targets for? Compiling or exporting?
Compiling:
mbed compile --supported(https://github.com/ARMmbed/mbed-cli#compiling-your-program)Exporting:
mbed export --supported(not listed under https://github.com/ARMmbed/mbed-cli#exporting-to-desktop-ides. I'll add it to the documentation soon)