ARMmbed / mbed-os-example-mbed-crypto

Mbed Crypto example for Mbed OS 5
Apache License 2.0
5 stars 19 forks source link

Update example to use Mbed OS 5.11.2 #12

Closed dgreen-arm closed 5 years ago

dgreen-arm commented 5 years ago

After updating to Mbed OS 5.11.2, Mbed OS prefers to use SD for storage over FLASHIAP if both are present. As the example should work on a K64F even without an SD, the SD component is removed to force Mbed OS to use FLASHIAP.

0xc0170 commented 5 years ago

@ARMmbed/mbed-os-storage Which PR did cause this ? I am checking 5.11.2 PRs , haven't found it so far.

0xc0170 commented 5 years ago

@davidsaada helped me to find it: https://github.com/ARMmbed/mbed-os/pull/8934 , this one caused this. @yossi2le You mentioned in the PR it was mistake, was this use case also considered?

dannybenor commented 5 years ago

@0xc0170 This is not new to 5.11.2, it is like this from the addition of FLASHAIP https://github.com/ARMmbed/mbed-os/pull/8317

davidsaada commented 5 years ago

@dannybenor I think that the problem here is that KVStore init (called from somewhere inside PSA) fails if we don't have an SD card present. But @dgreen-arm should probably answer it better.

dgreen-arm commented 5 years ago

I believe that's whats happening, the example was failing with KV Config: Fail to get external BlockDevice.

It looks like the example wasn't tested properly for the 5.11.1 release, as it worked with 5.11.0-rc4 but not 5.11.1.

dannybenor commented 5 years ago

The example can work if you have an SD card in your K64F board. This is the right setup and the right mbed OS default because all tests of PDMC are done with SD cards and FATfs. I see no problem if a crypto example wants to work without SD card.