Minor issues about verbose option
Describe the bug
Verbose option is not accurate
To Reproduce
If you go in mbed-os-example-blinky
$ mbedtools compile -m NUCLEO_G031K8 -t ARM
xxxx <normal error>
More information may be available by using the command line option '-v'.
As indicated in the console, I tried the command line option '-v':
$ mbedtools compile -m NUCLEO_G031K8 -t ARM -v
Usage: mbedtools compile [OPTIONS]
Try 'mbedtools compile -h' for help.
Error: no such option: -v
=> issue 1 ?
I changed the placement:
$ mbedtools -v compile -m NUCLEO_G031K8 -t ARM
xxx
More information may be available by using the command line option '-vv'.
=> exactly the same console print as without '-v'... => issue 2 ?
$ mbedtools -vv compile -m NUCLEO_G031K8 -t ARM
xxx
More information may be available by using the command line option '-vvv'.
=> exactly the same console print as with or without '-v'...
$ mbedtools -vvv compile -m NUCLEO_G031K8 -t ARM
xxx
More information may be available by using the command line option '--traceback'.
=> now we have more prints :-)
Desktop (please complete the following information):
- OS: Windows
- Version: 10
Mbed (please complete the following information):
- Device: NA
- Mbed OS Version: 6.9.0
- Mbed CLI 2 Version: 7.7.0
Additional context Add any other context about the problem here.
Yep, agreed this is silly.
I want to see the compiler command line args. I updated to mbedtools-7.23.0, but i try -vvv, i see a bunch of debug stuff but not gcc command line. Is it a ninja limitation?
I want to see the compiler command line args. I updated to mbedtools-7.23.0, but i try -vvv, i see a bunch of debug stuff but not gcc command line. Is it a ninja limitation?
The compiler command lines are printed by the cmake command, e.g. when you run cmake --build <build_dir> -v. We should let mbed-tools pass -v to cmake.
I personally suggest:
- keeping the existing
mbed-tools -v compile(-vbefore subcommand) for mbed-tools python self traces. - adding
mbed-tools compile -v(-vfor subcommand, which is missing and thus Issue 1!) to print compiler commands. This should cause-vto be passed tocmake.