8 years, 1 month ago.

How do I #define symbols in mbed_settings.py?

With the mbed CLI it seems like you can only define symbols on the command line using -DSYMBOL. I assume there is a way to do this from the mbed_settings.py file too, but I can't work it out.

Answer Edit

It seems that you create a file called `mbed_app.json` and define symbols like this:

{
    "config": {
        "param1": {
            "help": "The first configuration parameter",
            "macro_name": "CUSTOM_MACRO_NAME",
            "value": 0
        }
    }
}

See https://github.com/ARMmbed/mbed-os/blob/master/docs/config_system.md

1 Answer