Configuring compile-time customizations

The Arm Mbed OS configuration system, a part of the Arm Mbed OS build tools that underpin Mbed Studio, customizes compile time configuration parameters. Each library may define a number of configuration parameters in its mbed_lib.json. The program-level mbed_app.json may override the values of these configuration parameters. At compile time, the configuration system gathers and interprets the configurations defined in all mbed_lib.json files and the mbed_app.json file and creates a single header file, mbed_config.h, where the defined configuration parameters are converted into C preprocessor macros.

Some examples of configuration parameters:

  • The sampling period for a data acquisition application.
  • The default stack size for a newly created OS thread.
  • The receive buffer size of a serial communication library.
  • The flash and RAM memory size of an Mbed target.
  • Bare metal profile and small C-library use.

To use the configuration system, please see the Mbed OS documentation on the topic.

mbed_app.json for a bare metal program, and mbed_lib.json for the drivers