Configuring 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.
Changing and customizing build profiles
The default build profile in Mbed Studio is Debug. To change the build profile, from the Build profile drop-down list, select Develop, Release or Import custom profile. You can also right-click on your program and select Set Build Profile, then select a profile.
Note: The Import custom profile option is only available from the Build profile drop-down.
Select a build profile.
To customize a profile that is part of the Mbed OS tools from your active program:
In the files pane, expand the active program to show the sub-directories and files.
Go to mbed-os > tools > profiles. The
release.jsonfiles are displayed.
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.