Arm Mbed and Pelion Device Management support forum

Why are extra .json files used by "mbed compile"?

I am building a project that I inherited from another developer. I understand to some degree the effect of targets.json and mbed_app.json (I don’t have any mbed_lib.json files.) but the project has a couple extra .json files that are used (deleting them causes build errors). These .json files are in my ROOT directory (as defined in .mbed) but I can’t figure out why mbed compile is using them.

Does mbed CLI automatically use .json files just as it does other source files?

Note that I’ve looked at Mbed OS Build Rules which discusses which source files are used in a build but I couldn’t find any discussion of .json files.

I also found a discussion of custom_targets.json in https://os.mbed.com/docs/mbed-os/v5.14/reference/configuration.html where it says:

In prior releases, the configuration system provided a method for adding custom targets. The Mbed OS tools now look for custom targets in a file named custom_targets.json in the root of an application and treat custom targets the same as Mbed targets.

When mbed compile uses these additional .json files, is this an example of the method used in prior releases?

I never got custom_targets.json to work. I just add my targets directly to targets.json

What are the names of the extra json files?

<my project>_comm_protocol_service_psa.json
<my model>_service_psa.json

so nothing that I would expect Mbed to recognize.

There is new documentation for building custom targets. It might have been merged with the release of 5.15. Otherwise it can be found in the docs github source.

Are you able to post contents of the files?

Any magic custom build scripts laying around that the previous de was using?

May already be known but PSA usually stands for platform security architecture in our context.

Thanks for the response, @grit.

The previous dev set up a bunch of Makefiles but under the covers, these manifest files are used by an “mbed compile” command.

I read an email from a colleague just this morning who discovered what these files are: Secure Partition manifests. See here for more information.

Were the makefiles generated by one of the mbed tools system’s exporters?