Skip to content

Conversation

@LDong-Arm
Copy link
Contributor

@LDong-Arm LDong-Arm commented Jun 1, 2021

  • .travis.yml: Update mbed-tools commands
  • Enable PSA by default
  • Update README with Mbed CLI 2 instructions

Commands for mbed-tools have been renamed since `.travis.yml` was
first added to this repository.
@LDong-Arm LDong-Arm requested a review from a team June 1, 2021 09:58
@LDong-Arm LDong-Arm changed the title .travis.yml: Update mbed-tools commands Fix Travis and README, enable Mbed OS PSA by default Jun 1, 2021
"platform.stdio-convert-newlines": true,
"target.features_add" : ["EXPERIMENTAL_API"],
"target.features_add" : ["EXPERIMENTAL_API", "PSA"],
"target.extra_labels_add": ["MBED_PSA_SRV"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need MBED_PSA_SRV? Shouldn't this example work also with a TF-M target?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

README.md Outdated

## Prerequisites
* Install <a href='https://github.com/ARMmbed/mbed-cli#installing-mbed-cli'>Mbed CLI</a>
This example enables Mbed OS PSA. It is compatible with **non-TF-M** targets, as TF-M has its own PSA implementation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example should work with TF-M. If not, we need to understand why it doesn't and fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated it. Hopefully we can get this PR in to unblock Travis, and #95 actually fixes TF-M support.

README.md Outdated

List of examples contained within this repository:
* Example code snippets for using the library, with [documentation](https://github.com/ARMmbed/mbed-crypto/blob/development/docs/getting_started.md).
This repository contains an example demonstrating the compilation and use of Mbed Crypto on Mbed OS.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing issue, but we should say "PSA Crypto" instead of "Mbed Crypto". The example is expected to work with any PSA crypto implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Shall we also rename this repo to mbed-os-example-psa-crypto? Existing links to the old names will be redirected by GitHub.

@LDong-Arm
Copy link
Contributor Author

LDong-Arm commented Jun 7, 2021

@Patater Yes the main issue here is TF-M doesn't provide mbedtls_psa_crypto_free(). We can investigate whether it can be skipped or has any replacement.

@LDong-Arm
Copy link
Contributor Author

LDong-Arm commented Jun 8, 2021

@Patater I've created #95 to fix support for TF-M, shall we rebase this PR after that gets in.
Update: Maybe the other way round - I'll update this one first to get Travis passing. Then base the TF-M fix on this.

@LDong-Arm LDong-Arm marked this pull request as draft June 8, 2021 11:36
LDong-Arm added 2 commits June 8, 2021 14:40
To enable Mbed OS PSA on a non-TF-M target, a user only needs to add

    `"target.extra_labels_add": ["MBED_PSA_SRV"]`

without having to touch `"target.features_add"` in `mbed_app.json`.
This slightly simplifies the manual configuration.
@LDong-Arm LDong-Arm marked this pull request as ready for review June 8, 2021 13:49
@LDong-Arm LDong-Arm requested review from a team and Patater June 8, 2021 13:49
@Patater
Copy link
Contributor

Patater commented Jun 10, 2021

@Patater Yes the main issue here is TF-M doesn't provide mbedtls_psa_crypto_free(). We can investigate whether it can be skipped or has any replacement.

We can remove the call to mbedtls_psa_crypto_free()

@LDong-Arm
Copy link
Contributor Author

This is now combined into #95

@LDong-Arm LDong-Arm closed this Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants