-
Notifications
You must be signed in to change notification settings - Fork 3k
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
STM32F: skip LittleFileSystem default instance and TDBStore tests #13593
STM32F: skip LittleFileSystem default instance and TDBStore tests #13593
Conversation
storage/kvstore/tests/TESTS/kvstore/general_tests_phase_1/main.cpp
Outdated
Show resolved
Hide resolved
@LDong-Arm, thank you for your changes. |
c44526f
to
6c956eb
Compare
@@ -101,6 +101,11 @@ static void kvstore_init() | |||
TEST_ASSERT_EQUAL_ERROR_CODE(0, res); | |||
|
|||
if (kv_setup == TDBStoreSet) { | |||
#if COMPONENT_FLASHIAP && !COMPONENT_SPIF && !COMPONENT_QSPIF && !COMPONENT_DATAFLASH && !COMPONENT_SD |
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.
This is cumbersome, but we don't know if the default instance of BlockDevice is FlashIAP or others.
@ARMmbed/mbed-os-storage @MarceloSalazar void flash_get_region_map_array(uint32_t **array_ptr, size_t *size_ptr); might help? |
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
Storage tests with NUCLEO_F767ZI-ARMC6:
Note that greentea doesn't make the difference between "real OK" and "skipped" |
The "runtime" skip prints a skip message in the log, but eventually reported as a pass,. It's a limitation of the test runner I think. |
…for STM32L2/4/7 Some internal flashes have non-uniform sectors, and for those ones we want to skip the initialization of default LittleFileSystem on FlashIAPBlockDevice (unless the user specifies an address range that's uniform). This commit adds a config to indicate if sectors are uniform.
ec091ac
to
8ea6fcb
Compare
@jeromecoutant @LMESTM I've changed the config name and set it for STM32F2/F4 too, could you please have another look? |
…or size is non-uniform By default TDBStore requires blocks to have the same size.
8ea6fcb
to
8910ec6
Compare
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.
Excellent work @LDong-Arm
CI restarted |
Jenkins CI Test : ❌ FAILEDBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
cloud-client-test failed with
|
I found the same issues in LTS CI, it looks like it's on master as well. I'll try to restart if all queues are empty to make sure it is valid issue. |
Hi @0xc0170 can we try CI on this again? |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
Fixes: #12806
STM32F2/4/7 internal flashes have non-uniform sector layouts – a few smaller sectors (16/32KB), followed by some large ones (e.g. up to 128/256KB) that form most of the total flash. This leads to alignment issues of LittleFileSystem which only supports one constant erase size, whereas we might get a mixture of smaller and larger sectors. This is largely reproducible on F7 targets, though F2/F4's small sectors have less combined capacity so only large ones get used by luck.
This PR skips LittleFileSystem creation on STM32F targets. If a user needs LittleFileSystem on STM32F, they can specify a subset of the flash (where sectors are of the same size), by setting
flashiap-block-device.base-address
andflashiap-block-device.size
intarget_overrides
of theirmbed_app.json
. Alternatively, they can manually create a LittleFileSystem instance on top of SlicingBlockDevice to limit the range of FlashIAPBlockDevice to use at runtime.The alignment issue also affects TDBStore sometimes, which requires two blocks of the same size. Thus we also skip TDBStore in
features-storage-tests-kvstore-general_tests_phase_1&2
Impact of changes
On STM32F targets: no more default instance of LittleFileSystem on STM32F provided; TDBStore test cases skipped.
(To reenable both, a user can specify a region of uniform sectors as described above.)
Migration actions required
To use LittleFileSystem on STM32F, users need to specify a region of uniform sectors as described above.
Documentation
We need to update https://os.mbed.com/docs/mbed-os/latest/apis/littlefilesystem.html to instruct users to specify a region of uniform sectors in those scenarios.
Pull request type
Test results
Reviewers
@jeromecoutant @LMESTM @evedon @MarceloSalazar
@ARMmbed/mbed-os-core