Mbed Studio CLI arguments

I’ve been using Mbed Studio for quite some time (custom target + GCC_ARM), but am wanting to delve into Mbed CLI a bit more.

I’m unable to build successfully with Mbed CLI 1/2, however I’m able to build successfully with Mbed Studio.

Is there any way to find the Mbed CLI arguments used by Mbed Studio? Either in documentation somewhere? Modifying a config file to output the CLI arguments during build? Some other fancy redirect hack to intercept the commands without Mbed Studio knowing?

Any help or tips would be greatly appreciated :slightly_smiling_face:

Hello Olly,

  • To get help on the mbed tool configuration options open your project in MbedStudio and type the following command into the terminal window and hit enter:
    mbed config -h

  • To list the mbed tool configuration use the following command:
    mbed config -L

  • To get help on the mbed tool compile options use the following command:
    mbed compile -h

  • To get info about the mbed tool compile configuration use the following command:
    mbed compile --config

Based on the listed configuration, during the compilation, the mbed tool (when using CLI1) automatically generates a mbed_config.h file in the project’s root directory. You can open and examine it in the MbedStudio. However, do not edit this file manually because it will be overwritten during the next compilation session. Instead, use the mbed_app.json file to modify the the project configuration.