mbed-tools icon indicating copy to clipboard operation
mbed-tools copied to clipboard

Minor issues about verbose option

Open jeromecoutant opened this issue 5 years ago • 3 comments

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.

jeromecoutant avatar Apr 06 '21 13:04 jeromecoutant

Yep, agreed this is silly.

Patater avatar Apr 06 '21 14:04 Patater

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?

dudmuck avatar Jun 19 '21 23:06 dudmuck

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 (-v before subcommand) for mbed-tools python self traces.
  • adding mbed-tools compile -v (-v for subcommand, which is missing and thus Issue 1!) to print compiler commands. This should cause -v to be passed to cmake.

LDong-Arm avatar Jun 21 '21 10:06 LDong-Arm