Mbed-os-example-uvisor problem with mbed-os-5.1.0

I’m on an OS X box, and cannot build a working mbed-os-example-uvisor if I use the latest mbed os which is currently 5.1.0. I’m using a FRDM-K64F board.

This results is a broken .bin which won’t run:

mbed import https://github.com/ARMmbed/mbed-os-example-uvisor
cd mbed-os-example-uvisor
mbed compile -m K64F -t GCC_ARM

However if I downgrade to 5.1.0-rc5 then I get a working image:

mbed update mbed-os-5.1.0-rc5
mbed compile -m K64F -t GCC_ARM

I could give more information if it helps. I just installed all of the development tools this week, and was able to create a working build yesterday. I was surprised when it broke today.

Filed a bug here: https://github.com/ARMmbed/mbed-os/issues/2385

Thanks. After reading that issue, I verified that editing mbed_app.json as follows allows a good build.

    "target_overrides": {
        "K64F": {
            "target.features_add": ["UVISOR"],
            "target.extra_labels_add": ["UVISOR_SUPPORTED"],
            "target.macros_add": ["FEATURE_UVISOR", "TARGET_UVISOR_SUPPORTED"]

Edited to add: I was able to build working images on both on OS X Yosemite, and Raspian Jessie.