7 years, 5 months ago.

How do I enable mbedtls?

I'm using mbed-cli but it doesn't compile or link the mbedtls source files. How do I tell it to do so?

Answer

Actually it *does* compile it, but some functionality is disabled by default, e.g. ECJPAKE. You can enable it by adding an mbed_app.json file like this:

{
	"macros": ["MBEDTLS_ECJPAKE_C"]
}

1 Answer

7 years, 5 months ago.

You answered your own question already, but generally speaking you want to override the TLS config file. You can do it via:

{
    "macros": [
        "MBEDTLS_USER_CONFIG_FILE=\"mbedtls_config.h\""
    ]
}

(in mbed_app.json)