Skip to content

STM32F303RE: Activate FLASHIAP #10493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2019
Merged

Conversation

LMESTM
Copy link
Contributor

@LMESTM LMESTM commented Apr 26, 2019

Description

As suggested in #10486 by @JanneKiiskila, we may activate FLASHIAP for F303RE.
Flash driver is already in place.

Pull request type

[ ] Fix
[ ] Refactor
[x ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

Release Notes

Tests results:
+-----------------------+---------------+-----------------------------+--------+--------------------+-------------+
| target                | platform_name | test suite                  | result | elapsed_time (sec) | copy_method |
+-----------------------+---------------+-----------------------------+--------+--------------------+-------------+
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_drivers-flashiap | OK     | 18.39              | default     |
+-----------------------+---------------+-----------------------------+--------+--------------------+-------------+
mbedgt: test suite results: 1 OK
mbedgt: test case report:
+-----------------------+---------------+-----------------------------+-----------------------------------+--------+--------+--------+--------                                                       ------------+
| target                | platform_name | test suite                  | test case                         | passed | failed | result | elapsed                                                       _time (sec) |
+-----------------------+---------------+-----------------------------+-----------------------------------+--------+--------+--------+--------                                                       ------------+
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_drivers-flashiap | FlashIAP - init                   | 1      | 0      | OK     | 0.09                                                                      |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_drivers-flashiap | FlashIAP - program                | 1      | 0      | OK     | 0.22                                                                      |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_drivers-flashiap | FlashIAP - program across sectors | 1      | 0      | OK     | 0.16                                                                      |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_drivers-flashiap | FlashIAP - program errors         | 1      | 0      | OK     | 0.1                                                                       |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_drivers-flashiap | FlashIAP - timing                 | 1      | 0      | OK     | 1.01                                                                      |
+-----------------------+---------------+-----------------------------+-----------------------------------+--------+--------+--------+--------                                                       ------------+
mbedgt: test case results: 5 OK
mbedgt: completed in 30.58 sec

Copy link
Contributor

@JanneKiiskila JanneKiiskila left a comment

Choose a reason for hiding this comment

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

LGTM, we need this to next Mbed OS 5.12.x patch release, please!
@adbridge

@ciarmcom
Copy link
Member

@LMESTM, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested a review from a team April 26, 2019 17:00
@JanneKiiskila
Copy link
Contributor

@0xc0170 - merge time!

@adbridge
Copy link
Contributor

@0xc0170 - merge time!

@JanneKiiskila I think more like CI time first...

@adbridge
Copy link
Contributor

CI started

@jeromecoutant
Copy link
Collaborator

Hi

FLASHIAP tests becomes OK with NUCLEO_F303RE.

But FLASHIAP enables also device_key tests, which are FAIL...

@JanneKiiskila could you check this ?

mbed test -t ARM -m NUCLEO_F303RE -v -n features-device_key-tests-device_key-functionality
==> KVMap init issue ?

@JanneKiiskila
Copy link
Contributor

@davidsaada - could you give it a look please?

@davidsaada
Copy link
Contributor

davidsaada commented Apr 29, 2019

@JanneKiiskila @LMESTM I don't have the board here, nor see the failure log, so it will be hard for me to tell why this fails.
That said, the test results posted here are not relevant for the change. They only test the FlashIAP driver, but the change adds the FlashIAP block device. This is best tested with the general block device test.
i.e. run:

mbed test -v -t GCC_ARM -m NUCLEO_F303RE --profile debug -n features-storage-tests-blockdevice-general_block_device

This may give more clues regarding the failure.

@davidsaada
Copy link
Contributor

@jeromecoutant Is the "KVMap init issue?" question based on a speculation or on log results you see?
Any logs (preferably with debug profile) will be welcomed.

@jeromecoutant
Copy link
Collaborator

KVMap init issue ?

This is the first debug step :-)
I added a printf at the beginning of some KVMap functions.

  • With DISCO_L475 (test OK), I get the init printf in the test log.
[1556540133.44][CONN][RXD] >>> Running case #1: 'Device Key - long consistency test'...
[1556540133.51][CONN][INF] found KV pair in stream: {{__testcase_start;Device Key - long consistency test}}, queued...
[1556540133.52][CONN][RXD] KVMap init
[1556540133.54][CONN][RXD] KVMap attach
[1556540133.55][CONN][RXD] KVMap config_lookup
...
  • With NUCLEO_F3, I couldn't and test is failing:
[1556539842.21][CONN][RXD] >>> Running case #1: 'Device Key - long consistency test'...
[1556539842.27][CONN][INF] found KV pair in stream: {{__testcase_start;Device Key - long consistency test}}, queued...
[1556539842.29][CONN][RXD] KVMap config_lookup
mbedgt: :95::FAIL: Expected Not-Equal

@davidsaada
Copy link
Contributor

Thanks @jeromecoutant. It seems like there's a problem with using the FlashIAP block device (test fails on getting the internal block device).
Can you run the general block device test as following and post the results?

mbed test -v -t GCC_ARM -m NUCLEO_F303RE --profile debug -n features-storage-tests-blockdevice-general_block_device

@davidsaada
Copy link
Contributor

@jeromecoutant BTW, it could well be that the internal flash of this board is small, not enough for the allocation of KVStore, hence the failure in device key test. Do you have the sector map of this board?
In addition, can you rerun the the FlashIAP test (whose results are posted in the description). It may well be that few of tests there also sense that there's not enough room in the flash for testing. But in this case, the test is skipped and you should see prints telling that.

@JanneKiiskila
Copy link
Contributor

@davidsaada - whare are the space requirements? It has the same amount of flash as Nucleo F411RE, but in a more sensible approach (2 kilobyte blocks, 256 pieces of them).

@davidsaada
Copy link
Contributor

@JanneKiiskila Took it offline with @jeromecoutant. Seems like it's not related to space requirements, but to something else we're trying to figure out now.

@davidsaada
Copy link
Contributor

@yossi2le

@yossi2le
Copy link
Contributor

yossi2le commented Apr 29, 2019

I see that this device is missing "device_has": [ "TRNG" ]. DeviceKey needs TRNG in order to work correctly or any other support which enables the MBEDTLS_ENTROPY_NV_SEED macro.

@JanneKiiskila
Copy link
Contributor

No, it does not have TRNG. It is similar to Nucleo F411, we need to inject the entropy externally.

@yossi2le
Copy link
Contributor

and are you injecting it from outside?

@yossi2le
Copy link
Contributor

@JanneKiiskila I don't think it is related to the TRNG and injection of the device key. The test should create a dummy ROT if there is no TRNG support. I have to run now but I will be happy to help debugging the issue tomorrow morning.
The only problem I do not have a board here. Do we have a remote one?

@JanneKiiskila
Copy link
Contributor

Yes, it is available in RaaS.

@yossi2le
Copy link
Contributor

Excellent, can you tell me on which RaaS. Please send me the details offline?

@mbed-ci
Copy link

mbed-ci commented Apr 29, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 30, 2019

@yossi2le @jeromecoutant What is the status here? I set it to needs work until we get confirmation the tests are fixed

@yossi2le
Copy link
Contributor

I have submitted a PR #10516 which should solve the issue of device key

Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

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

Approved as FLASHIAP tests are OK with this PR.

DEVICE_KEY tests will then be OK with #10516

@0xc0170 0xc0170 merged commit 58a5f95 into ARMmbed:master May 2, 2019
@JanneKiiskila
Copy link
Contributor

Excellent, let's get them in and enable stuff. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants