-
Notifications
You must be signed in to change notification settings - Fork 3k
Add FLASHIAP component to DISCO_H747 #11619
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
target | platform_name | test suite | result | elapsed_time (sec) | copy_method |
---|---|---|---|---|---|
DISCO_H747I-ARMC6 | DISCO_H747I | tests-mbed_drivers-flashiap | OK | 38.6 | default |
DISCO_H747I-ARMC6 | DISCO_H747I | features-device_key-tests-device_key-functionality | FAIL | 44.45 | default |
DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-kvstore-direct_access_devicekey_test | FAIL | 28.1 | default |
5f8c1ec
to
45c03bc
Compare
Thanks for running the tests. I think we need now additional commits here to get the tests to pass. We need these functionality to enable the Pelion Device Management Client. |
@JanneKiiskila, thank you for your changes. |
From my point of view this can be merged in, it definitely takes us forward (but something more is still needed for DeviceKey, but that can be a separate PR anyways). |
@@ -20,6 +20,9 @@ | |||
"NUCLEO_F429ZI": { | |||
"storage_type": "TDB_INTERNAL" | |||
}, | |||
"DISCO_H747I": { | |||
"storage_type": "TDB_INTERNAL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it will be easier to set the default value to TDB_INTERNAL ?
instead of overriding each target one by one ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SeppoTakalo - we should consider this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, apparently many modules are assuming that KVStore "just works", so we need to probably default to TDB_INTERNAL and silently steal some flash away from the app.
But of course it needs to be configurable, so that location can be overwritten.
Hi |
Yep, tests are still failing. The tests are passing with other boards, so there's definitely something to look into here. |
@SeppoTakalo - @jeromecoutant is right, does not make sense adding TDB_INTERNAL to these one-by-one, it should be a generic "default" choice, which you may then override if you so want. Question is - where does it actually put that TDB_INTERNAL storage in the flash? How does it define the place? Update:
|
21e2203
to
4bf4f93
Compare
@jeromecoutant are you happy with the updates? |
@JanneKiiskila Correct me is I am wrong.
You would like to merge this first patch, and follow the device key issue with #11617 |
4bf4f93
to
0dbfeea
Compare
Was this answered, can we progress here? |
@jeromecoutant - any ETA on a possible PR from STM, I think you have done thus plus a bunch of other work, too (like Ethernet etc.)? |
Yes I shared with you some dev for STM32H7, |
@ARMmbed/team-st-mcd Can we proceed with this PR as it is? It's not clear to me. |
Could we keep only the targets.json file update ? |
@JanneKiiskila Shall we? |
Yes, we can do that. I would want to add though the MBED_ROM_START and SIZE and the device_name to targets. json, too. |
FLASHIAP component/capability is needed for DeviceKey functionality and also for Pelion enablement - firmware update uses this feature, too.
DeviceKey needs the definition of the default storage place, define it to be TDB_INTERNAL (as for the other boards).
Place it at the end of the bank1, last two erase sectors. As erase sector is 128 kB, default size must be double of that. This can't be in bank2 as that is apparently dedicated to the M4 core. Memory map is available in; https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/flash_data.h Memory map does not have this information, but issue [11617](ARMmbed#11617) has.
This copies the approach of the STM32F7 flash driver submitted via PR ARMmbed#10248 With this change the board finally passes all of the device key tests 10/10 times correctly.
0dbfeea
to
a485001
Compare
Rebased, force pushed. The other changes are actually also required, without them the KVStore tests will not even run. With the cache fix (kudos to @kjbracey-arm) - we actually get the tests to pass now 100%, repeatedly. |
@@ -15,6 +15,10 @@ | |||
"internal_size": "0x8000", | |||
"internal_base_address": "0x00028000" | |||
}, | |||
"DISCO_H747I": { | |||
"internal_size": "256*1024", | |||
"internal_base_address": "0x080C0000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like so much having this value HARD CODED.
Couldn't this be an address like
" MBED_APP_START + MBED_APP_SIZE - 256*1024 + 1 "
?
Note: I'm okay to move on wit this first implementation and try to make a later modification that makes it more dynamic ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder wha the MBED_APP_SIZE is actually here? If it's 1024-(2*128), then it would be OK. We can do that change for sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But at least the offsets for example, you can't give as computed things - they had to be in real numbers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The offset you're referring should be "internal_size" right ? Basically we're allocating a region of size "internal_size" at the end of application flash memory, isn't it ? so if we get the end address, we can deduce the rest of it at least for default value. Of course application can overload to somewhere else in memory and over-write the 2 parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - with 1 comment that could be addressed at a later stage
CI started |
@SeppoTakalo - we might want to tweak also the enablement to be via the |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Flash tests also pass;
|
Description
FLASHIAP component/capability is needed for DeviceKey functionality
and also for Pelion enablement - firmware update uses this feature, too.
Related to issue 11617.
Reviewers
@ARMmbed/team-st-mcd @jeromecoutant @adbridge
Release Notes
Enable FLASHIAP component on ST DISCO_H747I.