Commit Graph

378 Commits (4b3cddff2a66d5b13ad861e8782d1d630c2479c1)

Author SHA1 Message Date
int_szyk ae6f8be146 Newline at the end of files 2019-08-01 08:44:58 +02:00
int_szyk 8b68a1ea58 Updated testcases 2019-07-31 10:46:38 +02:00
Seppo Takalo 0b8ae1b098
Merge pull request #11084 from mtomczykmobica/IOTSTOR-832
NVStore.cpp (and KVStore) - run-time failure handling missing
2019-07-23 15:28:26 +03:00
Seppo Takalo 3a96f436ea
Merge pull request #10847 from davidsaada/david_ps_add_sec_flags
PSA storage: Conform to "PSA 1.0.0" spec release
2019-07-23 12:05:22 +03:00
Marcin Tomczyk 6cdb8f0f49 NVStore.cpp (and KVStore) - run-time failure handling missing 2019-07-22 15:04:20 +02:00
Kevin Bracey a522dcfa0a Replace deprecated wait calls 2019-07-15 10:13:50 +03:00
David Saada fb3559d841 PSA storage: Conform to "PSA 1.0.0" spec release
- Add the no confidentiality & no replay protection flags
- Add actual size parameter in PS/ITS get APIs
- Change a few size parameters from uint32_t to size_t
2019-07-14 18:50:47 +03:00
Volodymyr Medvid 5cc66282dd PSOC6: remove PSA targets 2019-07-08 14:49:26 +03:00
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
Martin Kojtal 42fee4502d
Merge pull request #9241 from davidsaada/david_tdbstore_variant_erase_unit_fix
TDBStore: fix bug in sector blank check for variant sized sectors
2019-01-08 09:52:15 +00:00
Martin Kojtal b833bbde78
Merge pull request #9237 from yossi2le/yossi_remove_num_entreies
Refactoring and fixing some issues in KVStore configuration.
2019-01-08 09:48:26 +00:00
Yossi Levy 71afcf6c40 Adding return MBED_ERROR_UNSUPPORTED in _storage_config_default if no component is defined. 2019-01-07 16:50:06 +02:00
Martin Kojtal 0eabafa551
Merge pull request #9135 from yossi2le/yossi_get_type_for_bd
Get type for BlockDevice
2019-01-07 12:26:29 +00:00
David Saada 72f6f6c92f TDBStore: Perform garbage collection on failed writes
Partial writes may turn storage unusable. GC clears this scenario.
2019-01-06 15:03:40 +02:00
David Saada 66117097c4 TDBStore: fix bug in sector blank check for variant sized sectors 2019-01-03 17:14:43 +02:00
Yossi Levy 719395f347 fixing FAT mount failure in kvstore FILESYSTEM 2019-01-03 14:47:24 +02:00
Yossi Levy 388da7f841 Remove ROM overlaps checkup for kvstore FLASHIAP blockdevice if non default values are use
remove of rbp_number_of_entries from the kvstore configuration. Adding default option for storage_type
allowing the system to choose TDB_INTERNAl, TDB_EXTERNAL or FILESYSTEM base on the blockdevice component
set in the target board. Adding remarks to kv_config.cpp and break simplify the _get_blockdevice_FLASHIAP function
2019-01-03 14:01:42 +02:00
Yossi Levy d934b1bd00 Remove ROM overlaps checkup for kvstore FLASHIAP blockdevice if non default values are use 2018-12-26 12:08:34 +02:00
Yossi Levy 677dbd1612 removing output parameter from avoid_conflict_nvstore_tdbstore function. 2018-12-23 14:27:56 +02:00
Yossi Levy fcd24aa62b Create runtime error if TDBStore and NVStore are created in internal flash 2018-12-23 14:27:56 +02:00
Yossi Levy b17d13e75e Documnent changes and adding const to get_type method 2018-12-23 14:27:14 +02:00
Yossi Levy 9590441288 astyle fix 2018-12-23 11:03:45 +02:00
Yossi Levy b8b7292d8e astyle fix 2018-12-23 11:03:45 +02:00
Yossi Levy 1d71fb1c9f Add get_type method to block devices. 2018-12-23 11:03:45 +02:00
Martin Kojtal cc2e15c84e
Merge pull request #9158 from davidsaada/david_lto_dup_types
Fix LTO build failures due to duplicate local types
2018-12-20 16:30:16 +00:00
Martin Kojtal ab1c2be997
Merge pull request #8957 from InfernoEmbedded/fix-8913
Fix incorrect #ifdefs on DEVICE_FOO macros
2018-12-20 10:52:06 +00:00
Martin Kojtal 85c2fc7fb1
Merge pull request #9148 from davidsaada/david_fix_app_end_addr
Fix FLASHIAP_ROM_END macro for GCC_ARM & IAR toolchains
2018-12-20 10:48:26 +00:00
Alastair D'Silva 2617c5d55b Don't use define checks on DEVICE_FOO macros (mbed code)
The DEVICE_FOO macros are always defined (either 0 or 1).

This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-20 10:16:42 +11:00
David Saada ec0ebc2cec Fix LTO build failures due to duplicate local types 2018-12-19 15:52:43 +02:00
David Saada f3bac3451c Fix FLASHIAP_ROM_END macro for GCC_ARM & IAR toolchains
- Consider data section in GCC_ARM toolchain
- Consider init_array section in IAR toolchain
- Rename macro to FLASHIAP_APP_ROM_END_ADDR for clarity sake
2018-12-19 12:05:08 +02:00
Cruz Monrreal 80c6f5f8ee
Merge pull request #8972 from kjbracey-arm/merge_file_truncate
Merge feature-posix branch (FileHandle::truncate)
2018-12-17 14:49:56 -06:00
Cruz Monrreal 2697913773
Merge pull request #8990 from davidsaada/david_fat_tests_low_mem
Adjust FAT FS tests to low memory boards
2018-12-17 14:44:38 -06:00
Christopher Haster 8db2c0d00b Added filesystem implementations of truncate
- File::truncate
- FileSystem::file_truncate
- FATFileSystem::file_truncate
- LittleFileSystem::file_truncate
2018-12-14 19:29:29 +02:00
Cruz Monrreal 839e00509b
Merge pull request #9054 from theamirocohen/nvstore_max_keys
Fix max_keys reset limitation
2018-12-13 18:15:16 -06:00
David Saada 713b4704f2 Adjust FAT FS tests to low memory boards
This is achieved by checking whether the board can allocate a certain memory
chunk (threshold) and skipping the test if it can't.
This should prevent these boards from failing in CI.
2018-12-13 15:26:31 +02:00
Amir Cohen 4fe7834928 Remove dead code 2018-12-13 13:34:08 +02:00
Amir Cohen 901a493299 Improve tests by reducing kvstore reset occurrences 2018-12-13 11:47:25 +02:00
Amir Cohen eff52273f4 Fix max_keys reset limitation
Persist the max_keys value through a soft-reset, also prohibit max_keys set under predefined default value (16)
2018-12-12 15:05:09 +02:00
David Saada cb7f68e992 Fix a few SecureStore issues (following preliminary security review)
- Remove require integrity flag (authentication) - always authenticate
- Use RBP KV to store CMAC also in write once case
- Allow removing a key if reading it failed on RBP authentication error
- Disable SecureStore if user disables MBED TLS AES CTR or CMAC
2018-12-10 23:34:57 +02:00
Cruz Monrreal eec536b332
Merge pull request #8986 from davidsaada/david_tdbstore_fixes
Fix a few bugs in TDBStore and KV config
2018-12-10 10:16:37 -06:00
Cruz Monrreal 78d6018ecc
Merge pull request #8745 from kfnta/feature-new-target-future-sequana-psa
Add new target future sequana PSA
2018-12-06 13:13:36 -06:00
Oren Cohen 43468504cd disable nvstore for sequana_psa 2018-12-05 20:00:07 +02:00
David Saada e1bd5c9fac Fix a few bugs in TDBStore and KV config 2018-12-05 17:02:02 +02:00
Martin Kojtal 415747d692
Merge pull request #8933 from yossi2le/yossi_kvstore_integration
Fixing Doxygen descriptions
2018-12-05 13:21:00 +01:00
Amanda Butler 6201b8d32d
Edit TDBStore.h
Edit file for punctuation and consistent tense.
2018-12-04 16:27:35 -06:00
Amanda Butler 5c68c5226a
Edit SecureStore.h
Edit file for consistent tense.
2018-12-04 16:25:07 -06:00
Amanda Butler 66dc5a2eba
Add word to KVMap.h
Add missing article for clarity and capitalization.
2018-12-04 16:24:00 -06:00
Amanda Butler 77a931b579
Edit FileSystemStore.h
Make minor edits, mostly for consistent tense across documents.
2018-12-04 16:22:47 -06:00
Cruz Monrreal 53c03f9835
Merge pull request #8934 from yossi2le/yossi_kvstore_k64F_FileSystem
Setting K64F to use KVStore FileSystem configuration
2018-12-04 12:25:06 -06:00
Oren Cohen f1d3eb9340 Add FUTURE_SEQUANA_PSA target
* Modify linker scripts to be compatible with bootloader and PSA
* Add memory protection
* Modify original post-build step to allow link with PSA binaries
* Config kvstore for ITS on FUTURE_SEQUANA_PSA
* Enable PSA-Crypto on PSoC6 with NVSeed
2018-12-04 18:38:50 +02:00
jeromecoutant b2cfef23bc Remove NVSTORE enabled from NUCLEO_F410RB 2018-12-03 16:00:44 +01:00
Yossi Levy d21bfbfdab Setting K64F to use KVStore FileSystem configuration 2018-12-03 16:09:19 +02:00
Yossi Levy cdcf14ef79 Fixing Doxygen descriptions 2018-12-03 16:08:07 +02:00
deepikabhavnani da69da972f Add BlockDevice and Filesystem classes inside mbed namespace.
Adding new modules inside the namespace could be breaking change for existing code base
hence add `using namespace::class` for classes newly added to mbed namespace to maintian
backwards compatibility.

MBED_NO_GLOBAL_USING_DIRECTIVE is added to remove auto-addition of namespace
Macro guard `MBED_NO_GLOBAL_USING_DIRECTIVE` is added around namespace, to avoid
polluting users namespace.
2018-11-26 13:35:40 -06:00
Danny Shavit 53728e45b7 Add a new PSA Internal Trusted Storage APIs 2018-11-25 09:57:22 +02:00
Nir Sonnenschein 0283bb84e4
Merge pull request #8667 from davidsaada/kvstore_integration
KVStore & derived classes: design docs, implementation & configuration
2018-11-25 07:30:53 +02:00
David Saada e9c25e23a5 KVStore & derived classes: design docs, implementation & configuration
Implement the following:
KVStore base class
TDBStore class
FileSystemStore class
SecureStore class
Global APIs
Configuration framework
Design documentation
2018-11-24 17:43:35 +02:00
Amir Cohen cf846151eb Add block device small data size test 2018-11-19 14:49:28 +02:00
Cruz Monrreal II 0e4f843022 Merge branch 'david_buffered_bd_perf' of ssh://github.com/davidsaada/mbed-os into rollup-b.1 2018-11-15 18:26:11 -06:00
David Saada 50836e76a1 Improve the efficiency of BufferedBlockDevice 2018-11-15 11:52:22 +02:00
Martin Kojtal a4500e86f5 blockdevice test: fix coding style 2018-11-15 07:20:09 +00:00
Martin Kojtal 20646d3da1 littlefs: fix coding style 2018-11-08 08:54:43 +00:00
Martin Kojtal e54ce88bca storage: fix astyle coding style 2018-11-07 08:56:35 +00:00
Martin Kojtal 73cc54e5f7
Merge pull request #8524 from korjaa/more_blockdevice_tests
Add more generic BlockDevice tests.
2018-11-05 17:15:59 +01:00
Cruz Monrreal 0e6eac5faa
Merge pull request #8491 from lrusinowicz/new-target-future_sequana
New target future sequana
2018-11-03 07:05:58 -05:00
Leszek Rusinowicz 9b1db83eaa Added required changes outside of TARGET_Cypress tree:
1. In drivers/Timer.cpp make sure that hardware timer is initialized outside of critical section.
   This is because on PSoC 6 hardware resources are shared between both cores
   and we have to make sure that the other core is not already using a particular resource.
   This mechanism is based on interprocessor communication taht cannot be handled iside of
   critical section.
2. Added support for post-binary hook function for PSoC 6 targets, so the hex image for M0+ CPU core
   can be merged with M4 core image for the final image.
3. Added possibility to use hook function from exportes, so the M0+ hex image could be included
   in the generated project.
4. Included hex images in the build dependency list, so the update of image is catched by the
   build process.
2018-11-01 20:19:21 +01:00
Jaakko Korhonen c3e0e3e75d Add generic BlockDevice test for get_erase_value(). 2018-11-01 14:51:07 +02:00
Jaakko Korhonen ebef79a05c Add generic BlockDevice test for contiguous erase/write/read. 2018-11-01 14:51:07 +02:00
Kevin Bracey fc32d954ac FATFileSystem: fix format specifiers 2018-10-31 14:49:22 +02:00
Cruz Monrreal fba0669194
Merge pull request #8563 from marcuschangarm/default_qspif
Add QSPIF block device to default system storage
2018-10-30 22:32:01 -05:00
Marcus Chang 063a7842ba Add QSPIF block device to default system storage 2018-10-26 13:00:38 -07:00
Martin Kojtal fc741f03a1
Merge pull request #8346 from OpenNuvoton/nuvoton_fix_mbr
storage: fix valid partion check with windows formatted sd card
2018-10-26 09:37:28 +01:00
Amir Cohen 54d2f66aec Fix no block device handling 2018-10-23 16:41:54 +03:00
Amir Cohen 7962e0c525 Fix build issues 2018-10-23 10:54:58 +03:00
Amanda Butler 8bca678ed8 Copy edit README.md
Copy edit file, mostly for active voice.
2018-10-23 10:54:58 +03:00
Amir Cohen 71431437fd Fix typos 2018-10-23 10:54:58 +03:00
Amir Cohen 5a2e7e3367 Fix minor issues 2018-10-23 10:54:58 +03:00
Amir Cohen 1b45d00bde features/storage/TESTS/blockdevice/general_block_device/README.md 2018-10-23 10:54:58 +03:00
Amir Cohen 7d7a553836 Add general block device tests 2018-10-23 10:54:58 +03:00
Deepika 9db31d299b Resolve build issues in test
mbed.h was added in test, via greentea and utest header files. 'mbed.h' is removed
from header files and required header file and namespace is added to CPP/C files
2018-10-16 11:50:16 -05:00
Cruz Monrreal a6651b868b
Merge pull request #8317 from yossi2le/add-flashiap-bd-as-default
Add FlashIAP block device as default block device for WISE 1570
2018-10-15 10:22:34 -05:00
Anna Bridge 8dcc949c63
Merge pull request #8002 from deepikabhavnani/storage_remove_mbed_h
Storage: Add required header file and namespace element instead add all
2018-10-12 11:06:35 +01:00
Cruz Monrreal 0aed6bb43f
Merge pull request #8256 from yossi2le/fix_warnings_in_blockdevices
Fix warnings in block devices
2018-10-11 10:10:55 -05:00
Yossi Levy b84f377b73 Removing nvstore. adding back the option for configuration as in the external repo 2018-10-10 17:15:46 +03:00
Oren Cohen 9e337bb600 Restore disk_get_sector_size() to return WORD 2018-10-10 14:57:44 +03:00
Oren Cohen 37b5442656 Fix overflow in disk_get_sector_size() 2018-10-10 14:57:42 +03:00
Yossi Levy 473f8d3f94 Fixing the order of component if more than one is included for a target.
Revert deprecation of FlashIAPBlockDevice 2 argument constructor has this was a breaking change. This follows a similar change in the external flashiap-driver repo.
2018-10-10 12:32:08 +03:00
ccli8 8ef23ff54d Fix mis-recognize that Windows-formatted SD card has valid partitions
For Windows-formatted SD card, it is not partitioned (no MBR), but its PBR has the
same boot signature (0xaa55) as MBR. We would easily mis-recognize this SD card has valid
partitions if we only check partition type. We add check by only accepting 0x00 (inactive)
/0x80 (active) for valid partition status.
2018-10-09 11:06:49 +08:00
Deepika 8642ece022 Storage: Add required header file and namespace element instead add all 2018-10-08 07:32:04 -05:00
Martin Kojtal f42aab7715
Merge pull request #8121 from deepikabhavnani/thread_safety_info
Add thread safety info to FatFs/LittleFs
2018-10-05 16:56:55 +02:00
Nir Sonnenschein f1587b50d7
Merge pull request #8262 from juhoeskeli/mbrblockdevice_align
Align MBRBlockDevice writes to underlying BlockDevice write size
2018-09-28 13:23:55 +03:00
Cruz Monrreal 6b85ec7c57
Merge pull request #7953 from davidsaada/david_is_valid_erase_fix
Fix is_valid_erase function to use get_erase_size with address
2018-09-27 10:20:56 -05:00
Juho Eskeli d32b454c5b Align writes to blockdevice write size in MBRBlockDevice 2018-09-26 22:43:27 +03:00
Martin Kojtal 37654e546a
Merge pull request #7696 from aashishc1988/wizwiki_iar_error
skip the flashsim test if not enough memory cannot be allocated for it.
2018-09-26 15:08:23 +02:00
Yossi Levy dd065e3be1 Fix warnings in block devices 2018-09-26 14:35:48 +03:00
David Saada 999042dda3 Handle NVStore tests in a low memory environment 2018-09-20 11:53:51 +03:00
Aashish chaddha 887aafe321 skip the flashsim test if enough memory cannot be allocated for it. 2018-09-18 11:38:39 -05:00
deepikabhavnani 1cb87d3235 Added thread safety info to FatFs/LittleFs 2018-09-13 11:32:36 -05:00
Cruz Monrreal 6c30b2f48d
Merge pull request #7924 from kjbracey-arm/filebase_default
Add special handling for "/default" filesystem
2018-09-05 19:40:29 -05:00
Kevin Bracey c0dbc49aa0 Make "/default" an alias - add real names too
Make the built-in FileSystem::get_default_instance() implementation
instantiate storage as "flash" or "sd", with "default" as an alias.

This will aid interworking between simple and advanced filesystem code
on various platforms. The expectation is that the names "sd" or "flash"
will be always available if the device is available and configured,
regardless of what "default" represents.
2018-09-05 14:18:29 +03:00
Kevin Bracey fd4b3879be Change default filesystem name to /default
"/fs" is a tautology - not a good name for the default filing system, as
whereever we use it, we know we're specifying a filing system. Rename to
"/default".
2018-09-05 14:18:28 +03:00