Mistake on this page? Email us

Configuring Mbed OS build tools and profiles

Mbed Studio provides you with a set of Mbed OS build tools and profiles, which we standardize and test to ensure that they are backward compatible with previous Mbed OS versions. The tools that come with a program are specific to an Mbed OS version.

By default, you use the set of Mbed OS tools and build profiles that are available for the active program. You can customize the profiles to your needs; for example, by changing the programming language standards.

For more information about the Mbed OS build system and how to customize your project, see Structure of an Mbed OS project. See also Build profiles for more information about Mbed OS build profiles.

Changing and customizing build profiles

The default build profile in Mbed Studio is Debug. To change the build profile, select Develop or Release in the Build profile drop-down list. You can also do a right-click on your program and select Set Build Profile, then select a profile.

Select a build profile.

To customize a profile that is part of the Mbed OS tools from active program:

  1. In the files pane, expand the active program to show the sub-directories and files.

  2. Go to mbed-os > tools > profiles. The debug.json, develop.json, and release.json files are displayed.

  3. Click a profile JSON file to open and edit the profile in the editor pane.

    Alternatively, right-click the profile JSON file, and select Open or Open With > Code Editor.

Edit the profile JSON file to modify the profile.

Configuring compile-time customizations

As explained in The configuration system, which describes the Mbed OS configuration system (a part of the Mbed OS build tools), it is possible to define compile-time customizations and override the configuration parameters defined in libraries and the target, or define new configuration parameters.

In Mbed Studio, the customizations can be implemented as described in "Configuration parameters in mbed_app.json, mbed_lib.json" in The configuration system. You can do customizations by updating the mbed_app.json file and using a JSON object named "target_overrides". Your program has one mbed_app.json in the root of the project and may have many mbed_lib.json files from imported libraries. The configuration system gathers and interprets the configuration defined in the target in its target configuration, all mbed_lib.json files and the mbed_app.json file. Then the configuration system creates a single header file at compile time, mbed_config.h, that contains all of the defined configuration parameters converted into C preprocessor macros.

Warning: Do not edit mbed_config.h manually. It will be overwritten the next time you compile or export your program, and you will lose all your changes.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.