Commit Graph

270 Commits (7794d901f2be0737c02fa30fdae0b9ddf59dadf3)

Author SHA1 Message Date
Martin Kojtal 149d53cc89
Merge pull request #10619 from jamesbeyond/fm-iap
Fastmodel: enable flashIAP and kvstore
2019-07-02 14:23:00 +01:00
jeromecoutant bfd8bfdbc9 Wrong timeout value in greentea tests 2019-06-17 13:07:20 +02:00
Qinghao Shi 81c96a785d Tests: enable kvstore test for Fastmodel for test code coverage 2019-06-06 18:54:59 +01:00
Qinghao Shi 111daa0a4c FastModel: enable kvstore 2019-06-06 18:54:58 +01:00
Martin Kojtal ab82f1fca6
Merge pull request #10627 from devran01/remove_future_sequana_target
Remove targets FUTURE_SEQUANA_M0_PSA and FUTURE_SEQUANA_PSA
2019-05-24 12:16:10 +01:00
Oren Cohen ed29d64053 CR changes 2019-05-22 17:25:08 +03:00
Michael Schwarcz 79976e0304 Update storage mbed_lib.json for MUSCA_A1_S 2019-05-22 17:17:21 +03:00
Michael Schwarcz ff1c769c7e Add ARM_MUSCA_A1 as a new target platform
Musca-A1 is a Cortex-M33 based target with security extension enabled.

- ARM_MUSCA_A1 is the non-secure target running mbed-os.
- ARM_MUSCA_A1_S is the secure target running TF-M.
- TF-M sources were imported and patched in previous commits.
- TF-M secure bootloader (McuBoot) for MUSCA_A1 is submitted by a pre-built binary.
- A post-build hook concatenates The secure and non-secure binaries,
  signs it and then concatenates the bootloader with the signed binary.
2019-05-22 17:17:20 +03:00
Devaraj Ranganna 7765d39283 The targets FUTURE_SEQUANA_M0_PSA and FUTURE_SEQUANA_PSA are removed
due to partial implementation. Having FUTURE_SEQUANA_M0 and
FUTURE_SEQUANA PSA targets is misleading.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-05-21 15:00:31 +01:00
Martin Kojtal 3ea1c56124
Merge pull request #10147 from kjbracey-arm/atomic_bitwise
Assembler atomics
2019-05-13 14:18:05 +01:00
Martin Kojtal f65e30eb21
Merge pull request #10523 from yossi2le/yossi_fix_general_filesystem_tests
Removing support of FLASHIAP in general_filesystem tests
2019-05-13 13:28:34 +01:00
Olli-Pekka Puolitaival 842d145d91 Py3 fixes for test scripts 2019-05-08 13:46:01 +03:00
Anna Bridge 0ac1c97ed2
Merge pull request #10355 from OpenNuvoton/nuvoton_kvstore_other_bd
KVStore: Support external storage out of mbed-os tree
2019-05-07 15:56:41 +01:00
Martin Kojtal 3eaad5fd9f
Merge pull request #10485 from JanneKiiskila/nvstore-compiler-warning
NVStore.cpp compiler warning removal (os_ret)
2019-05-03 08:20:45 +01:00
Yossi Levy 130cab4bb4 Removing FLASHIAP support form general_filesystem tests as it is marked as skip anyway 2019-05-02 15:40:48 +03:00
Anna Bridge b1cd3dab16
Merge pull request #10258 from davidsaada/david_remove_feature_storage
Remove FEATURE_STORAGE and all underlying deprecated features
2019-04-26 13:31:37 +01:00
Kevin Bracey 87396e0bf6 Assembler atomics
Reimplement atomic code in inline assembly. This can improve
optimisation, and avoids potential architectural problems with using
LDREX/STREX intrinsics.

API further extended:
* Bitwise operations (fetch_and/fetch_or/fetch_xor)
* fetch_add and fetch_sub (like incr/decr, but returning old value -
  aligning with C++11)
* compare_exchange_weak
* Explicit memory order specification
* Basic freestanding template overloads for C++

This gives our existing C implementation essentially all the functionality
needed by C++11.

An actual Atomic<T> template based upon these C functions could follow.
2019-04-26 13:12:35 +03:00
Janne Kiiskila 300c3e767c NVStore.cpp compiler warning removal (os_ret)
One gets this compiler warning from nvstore.cpp:

```
Compile [ 48.6%]: nvstore.cpp
[Warning] nvstore.cpp@814,9: variable 'os_ret' set but not used [-Wunused-but-set-variable]
```

Turns out it's caused by the fact that the variable is only used
with MBED_ASSERTs, which get optimized out or not, depending on your
build profile. In reality we do not need a separate variable for that
in my opinion though, so we can just use the ret-variable instead
and drop the os_ret variable completely and thus avoid this
compiler warning.
2019-04-25 22:55:29 +03:00
ccli8 63d9cde507 KVStore: Support block device out of mbed-os tree
To support block device out of mbed-os tree in KVStore, user needs to:
1. Configure blockdevice to "other".
2. Override get_other_blockdevice() to provide block device out of mbed-os tree.
2019-04-25 09:56:20 +08:00
Martin Kojtal 1a14b9705a ExhaustibleBD: licensed under Apache 2.0
Fixing license, to the same one as .cpp file.
2019-04-16 10:32:23 +01:00
Cruz Monrreal f1c4a029c2
Merge pull request #9844 from cmonr/travisCI-refactor
Travis CI: Stages, OS update, apt-get relief!
2019-04-12 09:17:55 -05:00
Oren Cohen f70e069838 Configure PS with tdbstore 2019-04-10 17:33:37 +03:00
Cruz Monrreal II f6b9109934 Fixed littlefs tests to be Py3 compat 2019-04-08 10:45:07 -05:00
David Saada 50b2f20172 Remove CFSTORE VERSION file (colliding with an ARM 6.12 C++ header file) 2019-03-31 18:15:12 +03:00
David Saada 732dd36c90 Remove FEATURE_STORAGE and all underlying deprecated features 2019-03-28 23:10:05 +02:00
Amir Cohen ba6748fe41 Improve general Block Device tests
Fixing all rand issues, aligning erase addresses, moving prints to debug mode.
2019-03-26 14:49:57 +02:00
Martin Kojtal 54602f55ba
Merge pull request #10108 from theamirocohen/fix_is_valid_erase
Fix functionality for FlashIAPBD & SlicingBD
2019-03-19 09:31:33 +01:00
Martin Kojtal 78a3d99c81
Merge pull request #9941 from marcuschangarm/fix-rspif
Add missing RSPIF component to the defaut BlockDevice handler
2019-03-15 18:08:04 +01:00
Amir Cohen 7fac0722a4 Fix functionality for FlashIAPBD & SlicingBD
Due to discovery of inconsistent sector sizes in devices storage the is_valid_erase function was adjusted,
For FlashIAPBD the 'code size' was included to the calculation, preventing faulty "virtual" addresses calculation.
For SlicingBD the same error was fixed and in all 3 validation functions that sent addresses for validation and program/read/erase
different addresses.
2019-03-14 17:46:10 +02:00
Michael Schwarcz dca3ebe9f6 LPC55S69_S: reduce ITS size to 32KB
- Reduce LPC55S69 secure side ITS from 64KB to 32KB
2019-03-14 15:49:44 +02:00
Martin Kojtal b80c961dae
Merge pull request #10034 from evgenibo/flash_protected_region_config
PSA: PSoc 6 configurable secure memory size
2019-03-14 13:23:58 +01:00
Evgeni Bolotin c0bc56737b modify rpb base address for M0 2019-03-14 11:29:46 +02:00
Michael Schwarcz f6ab217892 Reduce 32KB from LPC55S69_S binary size 2019-03-13 18:21:37 +02:00
Mahesh Mahadevan c607b8ab1a LPC55S69: Update the KVStore config files
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:33:47 -06:00
Oleg Kapshii aedec74b9a Added support for PSA target to WIFI_BT board
Added WiFi_Bt CM4 PSA target in mbedos json
Added SPE-NSPE mailbox initialization for CM4 SystemInit
Made similar to FUTURE_SEQUANA configurations
Copied FUTURE_SEQUANA CM0 SPM part for WiFi_Bt smoke test
Added CY8CKIT_062_WIFI_BT_M0 and CY8CKIT_062_WIFI_BT_M0_PSA targets
Sorted files for new CY8CKIT_062_WIFI_BT_M0 and CY8CKIT_062_WIFI_BT_M0_PSA targets
Copied files for CY8CKIT_062_WIFI_BT_M0_PSA from FUTURE_SEQUANA
Copied and updated cm0p start files
Corrected according to FUTURE_SEQUANA
Changes to M0 startup files to have SPM started
Fixed implicit declaration warning
Commented interrupts enabling according to FUTURE_SEQUANA flow
Updated prebuild spm_smore CM0 hex for CM4 target
Turned on greentea environment
Used special memory region for common CM0/CM4 data
Updated prebuild CM0 SPM hex
Placed shared memory region for flash operations into SPM shared memory region
Updated cyprotection code and configuration
Start address of protected regions is set by a defined number from target.json
Added masters pcMask configuration
Added support for PSA target to WIFI_BT board
Enabled resources protection for SPM
Aligned RAM usage according to Cypress FlashBoot and CyBootloader
alligned protection config
Added CYW943012P6EVB_01_M0 target
Enlarged heap size, remobed nv_seed
Added heap reservation in linker script from mbed-os
Removed heap size definition
turned on nv_seed config
Removed nv_seed macros
Enabled protection for PSoC6 CM0
Added PSoC6 CM0 PSA readme
Enabled mbed_hal-spm test
Enabled nv_seed and removed unneeded ipc config define
Added SPDX string to feature_ble cypress target files
Removed unneeded supported_toolchains lines for Cypress targets
Disabled protection settings
Corrected flash initialization for PSoC6 CM0 PSA
Changed PSoC6 IPC6 protection for flash
Enabled special flash initialization and enabled protection settings
Updated and added new prebuild PSoC6 CM0 PSA hex files
Disabled HW TRNG and CRC for PSoC6 CM4 PSA target
Added missing const to allow types to match
Updated PSoC6 WIFI_BT_PSA prebuilt directory
Moved PSoC6 shared section usage area definition to begin of ld
Added initial ARM_STD linker and startup files for PSoC6 CM0
Added initial IAR linker and startup files for PSoC6 CM0
Added defines to disable some SPM protection settings for PSoC64
Moved Flash function variables into separate memory region
Added defines for new Public area definition
Updated PSoC6 CM0_PSA hex-files
2019-03-07 08:40:20 -08:00
Michael Schwarcz 14aa347040 TF-M config: Add max_ns_thread_count parameter 2019-03-07 12:18:19 +02:00
Cruz Monrreal 26920fe0cc
Merge pull request #9931 from offirko/offir_nxp
Reduce number of threads in block device test
2019-03-05 22:48:10 -06:00
David Saada 3c14dd4d6e Fix test skip message to not enough heap 2019-03-05 22:42:46 +02:00
offirko 4075d6ee49 Add pre test resource verifications 2019-03-05 22:42:45 +02:00
offirko e41118796a Reduce number of threades in block device test
In addition, prevent FS tests from running on internal flash,
due to the fact that file system on internal flash is not part of
our offering (TDBStore should be used there instead).
2019-03-05 22:40:24 +02:00
Marcus Chang ee8632f993 Add missing RSPIF component to the defaut BlockDevice handler 2019-03-05 08:25:48 -08:00
David Saada eb29af5f8a Fix direct access to device key test for small erase/program ratio
This commit fixes the failure in the "Direct access to device key" test,
when working with internal flash components, whose erase size to program
size ratio is small. In such cases, the last two sectors are not large
enough to store the device key.
2019-03-05 11:32:29 +02:00
Senthil Ramakrishnan 65e765148a Fix configuration_store.h to use right toolchain check flags 2019-02-28 11:56:31 -06:00
Cruz Monrreal d29312e7ac
Merge pull request #9808 from ARMmbed/feature-iar8
IAR 8 feature branch merge
2019-02-26 15:30:27 -06:00
Amir Cohen 5c7f6cb755 Merge SPIF & QSPIF components test to general block device tests
The SPIF and QPIF components tests are fully merged into general block device tests and were deleted
2019-02-26 10:28:45 -06:00
Amir Cohen b8fed58f12 Modifing general block device tests doe to targets enhancement
Due to targets enhancement some boards failed the general block device tests for flashiap component,
The fails were due to boards containing inconsistent sector sizes.
The tests were modified but should be improved to address the problem.
Rand() function issues were fixed.
2019-02-26 09:24:09 -06:00
Deepika d2e11966fc Revert "rand() by default does increment of 1, randomizing more"
This reverts commit f7a6d254f6.
2019-02-26 09:21:19 -06:00
David Saada 671c5a0510 Remove unnecessary prints in FileSystemStore class 2019-02-24 14:23:40 +02:00
Deepika f7a6d254f6 rand() by default does increment of 1, randomizing more
Random number generation in case of IAR 8, requires TLS support.
Thread local storage is not part of Mbed OS, test is updated to have random
numbers sparse, but in future random number creation should be moved to main
thread, or use some other logic for randomization instead of rand() call.
2019-02-22 16:44:54 -06:00
Ron Eldor c94b5861e4 Add mbedtls platform setup and teardown to modules
Add calls to `mbedtls_platform_setup()`
and `mbedtls_platform_teardown()` to all modules and tests using Mbed TLS.
2019-02-18 11:43:32 +02:00
Oren Cohen bb775c2e69
Storage mbed_lib.json files 2019-02-13 20:36:00 +02:00
Cruz Monrreal b820ec8922
Merge pull request #9561 from theotherjimmy/test-resources
Tools changes for bare metal
2019-02-13 12:31:54 -06:00
offirko 4bbc2cdc5b Fix general block device test to ensure unique block address per test 2019-02-10 10:38:46 +02:00
Martin Kojtal a0c4646e27
Merge pull request #9551 from theamirocohen/fix_gen_test_for_flashiap
Modify general blockdevice tests to run all storage components
2019-02-01 08:24:09 +01:00
Cruz Monrreal 66792b493e
Merge pull request #9445 from davidsaada/david_nvstore_fix_area_calc
NVStore: fix area calculation function
2019-01-31 10:20:44 -06:00
Amir Cohen a07f0fafaa asyle issues 2019-01-31 14:40:33 +02:00
Amir Cohen f1f60bf341 Modify general blockdevice tests to run all storage components
All tests will run for each storage component available on device excapt for test_get_type_functionality that will run once on the default blockdevice.
2019-01-31 14:36:37 +02:00
David Saada 48a3ae9636 FlashIAP driver: Add retries to erase and program operations.
Few boards may fail the write actions due to HW limitations (like critical
drivers that disable flash operations). Just retry a few times until success.
In addition, remove the redundant retries in NVStore (not needed now).
2019-01-30 16:05:27 +02:00
David Saada 765b48336f NVStore: fix area calculation function
Don't allocate the sector map array in this function,
as it was buggy and redundant. Separate user config vs. automatic allocation
cases instead (which was essentially the case anyway).
In addition, fix tests to get over failures in low end boards
2019-01-24 16:16:56 +02:00
Veijo Pesonen 293b0189d2 Adds newlines to avoid compiler warnings 2019-01-23 16:44:16 +02:00
Martin Kojtal f128891fc0
Merge pull request #9397 from yossi2le/fix_default_storage_type
Fixing folder path for KVStore FILESYSTEM configuration.
2019-01-22 13:35:52 +01:00
Yossi Levy 5de92ca4c6 Fixing a bug in FileSystemStore to get the folder path from kv_config in FILESYSTEM and default configuration 2019-01-21 11:19:14 +02:00
David Saada c826f2eba2 Put LittleFS emulated BD module under .mbedignore 2019-01-20 16:06:08 +02:00
Martin Kojtal cee814dc29
Merge pull request #9377 from offirko/offir_general_block_device_test
test: general_block_device fix to always erase prior the first program
2019-01-18 11:48:41 +01:00
Martin Kojtal 6c6ebc6b80
Merge pull request #9406 from geky/littlefs-validate-all-dirs
Extended mount to check all metadata-pairs
2019-01-18 11:34:38 +01:00
Martin Kojtal 40f40ac188
Merge pull request #9407 from offirko/offir_direct_access_handle_default_config
DirectAccess DeviceKey: add support for default storage type
2019-01-18 11:31:51 +01:00
Cruz Monrreal 3b43a2d976
Merge pull request #9333 from offirko/offir_doxygen
Minor Doxygen fixes for BufferedBlockDevice and iBeacon
2019-01-17 21:51:14 -06:00
Christopher Haster 9d6e309432 Extended mount to check all metadata-pairs
The most common issue with using littlefs in mbed-os is when users
change from littlefs->FAT->littlefs (or with MBR or similar). When this
corrupts the superblock, littlefs tries to fall back to the backup
superblock. However, at this point in the time the old superblock may be
very out-of-date and pointing to an incorrect filesystem.

There's no complete solution to a malicious modification of the
filesystem (short of checking all metadata+data, a very expensive
operation), but we can at least expand our validation to all of the
metadata for the filesystem. This at least catches the common issues
with changing between different filesystems.
2019-01-17 11:02:29 -06:00
offirko e996b7f9ce DirectAccess DeviceKey added support for default storage type 2019-01-17 10:58:55 -06:00
Cruz Monrreal 4f95298669
Merge pull request #9361 from yossi2le/yossi_fix_for_tfm
Removing dependency of TDBStore in SystemStorage file and moving some file location - TFM support.
2019-01-16 22:06:07 -06:00
Jimmy Brisson e201fdb6e9 Add placeholder libraries for things we probably refer to as libraries 2019-01-16 14:58:58 -06:00
David Saada af23e3f489 MBRBlockDevice: When partitioning, clear the rest of first erase unit
Make sure all the parts of the first erase unit, that are not part of the
partition table are clear.
2019-01-15 16:43:03 +02:00
Martin Kojtal 82abf979dd
Merge pull request #9363 from davidsaada/david_fsst_tr_error_remove
Remove unnecessary error prints in FileSystemStore
2019-01-15 10:34:38 +01:00
Alexander Zilberkant 971e29b669 Remove TARGET prefix from the TARGET_BYPASS_NVSTORE_CHECK and leave it as BYPASS_NVSTORE_CHECK 2019-01-15 10:54:22 +02:00
Yossi Levy 849db51b3a Moving DirectAccessDevicekey.h and DirectAccessDevicekey.cpp to direct_access_devicekey sub folder For TFM support 2019-01-15 10:54:21 +02:00
Yossi Levy a05180ac04 Moving KVStore to include sub folder For TFM support 2019-01-15 10:54:21 +02:00
Yossi Levy eb7cbc1432 Removing the dependency of TDBStore in SystemStorage.h and NVStore co-existence checkup if compile for target TFM 2019-01-15 10:54:21 +02:00
offirko 5a9db72098 general_block_device test fixed to always erase prior to first program 2019-01-15 10:10:39 +02:00
Alexander Zilberkant 454ae256d4 Set "TDB_INTERNAL" default storage for Pelion
NUCLEO_F411RE
NUCLEO_F429ZI
UBLOX_EVK_ODIN_W2
2019-01-13 18:30:22 +02:00
David Saada d6382bb114 Fix the general block device to support better low memory boards
In addition, fix prints and warnings.
2019-01-13 18:17:39 +02:00
David Saada 90e4286f2d Remove unnecessary error prints in FileSystemStore 2019-01-13 17:17:55 +02:00
Martin Kojtal 307bdd7363
Merge pull request #9305 from davidsaada/david_littlefs_fatfs_doxy_fix
Minor Doxygen fixes for all file system classes
2019-01-11 14:07:51 +00:00
Martin Kojtal adeb5be670
Merge pull request #9334 from yossi2le/yossi_write-a-thon2
Doxygen fixes in block devices
2019-01-11 14:06:50 +00:00
Guy Wild 6954c396fb Update BlockDevice.h 2019-01-10 16:38:00 +02:00
Yossi Levy 51168ee840 Merge branch 'yossi_write-a-thon2' of github.com:yossi2le/mbed-os into yossi_write-a-thon2 2019-01-10 15:55:08 +02:00
Mel Weed 10662582d1
minor editorial tweaks
partition's->partition
2019-01-10 15:53:59 +02:00
Yossi Levy 73ac904ef9 Doxygen changes to ProfilingBlockDevice and SlicingBlockDevice. 2019-01-10 15:53:49 +02:00
Martin Kojtal d20b59153a
Merge pull request #9244 from theamirocohen/kvstore_tests_api
Kvstore tests api change to run on K64F only
2019-01-10 13:48:31 +00:00
offirko b21576c8cf Review updates 2019-01-10 15:42:28 +02:00
Yossi Levy 7dde6773f9 Some Doxygen fixes in MBRBlockDevice and BlockDevice 2019-01-10 15:10:47 +02:00
David Saada 3c7924ac9c Minor Doxygen fixes for all file system classes
- Remove Doxygen generation on protected functions
- Minor description fixes
2019-01-10 15:09:52 +02:00
offirko 61926092a2 Minor Doxygen fixes for BufferedBlockDevice and iBeacon 2019-01-10 14:35:09 +02:00
David Saada 5d1985019f Remove kvstore's mbed_lib.json file (not relevant any more)
In addition, use the NOT_SUPPORTED directive to skip the tests.
2019-01-09 16:25:13 +02:00
Amir Cohen 9a5841ad00 Kvstore tests api change to run on K64F only
Change KVStore API tests to run only on K64F, these tests check the KVStore functionality without actually testing the board's storage,
Thus they should produce the same results for each device they run on.
K64F was selected for no special technical reason but only because of it being available and convenient to use.
2019-01-09 14:52:11 +02:00
Yossi Levy 423c4fbc18 The direct_access_devicekey test should not run if there is no component flashiap block device in the target 2019-01-09 13:48:25 +02:00
offirko 6592e85c13 Added utility function to help locate expected internal flash tdbstore position.
(Supporting FILESYSTEM and TDB_EXTERNAL configuration only)
2019-01-09 13:48:25 +02:00
offirko bb0d1afa9a Updated test to consider tdb_internal non default configuration as well 2019-01-09 13:48:25 +02:00
offirko 945579378e Adding low code size tool for direct access to Devicekey.
This enables application with code size restrictions to access
devicekey directly based on address in internal flash without kvconfig overhead
2019-01-09 13:48:24 +02:00
Martin Kojtal cc9562e0a5
Merge pull request #9136 from yossi2le/yossi_tdbstore_nvstore_co_exist
TDBStore and NVStore should create an error if co exist.
2019-01-08 12:02:37 +00:00
Martin Kojtal 5a5ad8d26d
Merge pull request #9200 from davidsaada/david_tdbstore_gc_if_corrupt
TDBStore: Perform garbage collection on failed writes
2019-01-08 11:55:31 +00:00