Commit Graph

150 Commits (7c17693c06dd3be022b36a58e86b10520ab81ec2)

Author SHA1 Message Date
Martin Kojtal 5fe4dafc34
Merge pull request #14221 from macronix/macronix_rww
Enable the RWW function of Macronix Flash MX25LW51245G in OSPI block device driver
2021-06-02 16:53:59 +02:00
Rajkumar Kanagaraj 50fc85dc44 CMake: Remove all unittest.cmake script from test suite
- Remove redundant cmake script as already added the CMake configuration file
- Remove redundant empty_baseline as it is no longer needed with the help of CMake configuration file
2021-05-26 07:09:14 -07:00
Anna Bridge 4e586a93d3
Merge pull request #14426 from ARMmbed/feature_unittest_refactor
CMake: Refactor UNITTESTS CMake
2021-05-24 13:04:22 +01:00
Rajkumar Kanagaraj 6d4caad83d CMake: Move CMAKE_CROSSCOMPILING check inside library CMake 2021-05-20 06:26:10 -07:00
harmut01 6b2c133a98 Refactor KVStore config override explanation
The documentation previously referred to a weakly defined function
`storage_configuration`, however, this function was replaced at some
stage by `kv_init_storage_config`. Refactor the explanation on how to
override the default configurations to reflect this. Also, remove
the snippet which was used to show the implentation of
`storage_configuration`.
2021-05-11 17:19:16 +01:00
harmut01 468ee97bdd Deprecate TDB_EXTERNAL_NO_RBP and FILESYSTEM_NO_RBP in kv_config
NO_RBP (no rollback protection) is intended to not require an internal
TDB, however, DeviceKey, which we use to derive SecureStore's
encryption key, still does. Currently, no internal TDB is created with
these two configurations, meaning there's no way to store the DeviceKey
and SecureStore doesn't work.
2021-05-11 17:19:10 +01:00
Rajkumar Kanagaraj 91051cbd4d CMake: fix lifflefs filesystem header include path
- LittleFileSystem.h and LittleFileSystem.cpp refers to the littflefs headers with the complete path like storage/filesystem/littlefs/littlefs/lfs_util.h and fixed the path issue
2021-05-11 03:41:00 -07:00
Rajkumar Kanagaraj 98215d322d CMake: Fix ChainingBlockDevice unittest
- ChainingBlockModuleTest test case compares two strings with EXPECT_EQ
which normally compare strings residing memory address so replaced it with EXPECT_STREQ  to compare strings.
2021-05-11 02:29:56 -07:00
Rajkumar Kanagaraj 4536fff63a CMake: Refactor storage blockdevice and SFDP unittests cmake
- Add CMake configuration file
- Fix the header inclusion in blockdevice unittests
2021-05-11 02:29:56 -07:00
Rajkumar Kanagaraj c0a8fe62f5 CMake: Refactor storage TDBstore and FileSystemStore unittest cmake
- Add CMake configuration file in TDBstore and FileSystemStore unittest.
2021-05-11 02:29:56 -07:00
Rajkumar Kanagaraj ba04c1cf76 CMake: Add add_subdirectory of unittests
- add every libraries unittest directory into respective CMake
  which allows to include unittest source into build based on
  MBED_BUILD_UNITTESTS flag
2021-05-11 02:29:56 -07:00
rogeryou 6d90674546
Update OSPIFBlockDevice.cpp
modify the definition of the tables
2021-05-07 09:27:37 +08:00
plan-do-break-fix 915b45af23 fix(docs): corrects various typos in project documentation 2021-04-23 23:31:11 -05:00
Lingkai Dong 7b763be0e3 TDBStore Whitebox tests: fix memory check
Each block of HeapBlockDevice is only allocated from the heap when
that block is programmed. And erasing a block frees the associated
buffer.

To decide if there is enough heap to run the TDBStore Whitebox tests,
we need to perform a trial program() instead of erase().
2021-04-14 17:19:38 +01:00
Lingkai Dong aedc6009ea TDBStore: call `BlockDevice::erase()` regarless of erase value
From the documentations of `BlockDevice::get_erase_value()`:

    -1 if you can't rely on the value of the erased storage

and `BlockDevice::program()`:

    The blocks must have been erased prior to being programmed

So, `BlockDevice::erase()` should always be called regardless of
erase value.
2021-04-14 17:19:38 +01:00
Lingkai Dong fb4e5e80b4 TDBStore: optimize erase algorithms
Currently `TDBStore::offset_in_erase_unit()` and
`TDBStore::check_erase_before_write()` loop through erase units
one-by-one, until the entire range is covered. This is very inefficient
when the erase size is tiny, e.g. one-byte on a non-flash device for
which we use program as erase.

This commit reworks the algorithms, based on the fact that a block
device can erase or program as many units as needed in one go.
2021-04-14 17:19:38 +01:00
Lingkai Dong e8070514b1 FileSystemStore unit test: remove erased_set_get test
The "erased_set_get" test case deinits `FileSystemStore`, erases the
block device, and reinits `FileSystemStore`. This of course fails,
because `BlockDevice::erase()` removes all stored data including the
format of the `FileSystem` (middle layer), unless the particular type
of block device has a no-op erase implementation.

Note: Previously `HeapBlockDevice::erase()` was essentially a no-op
so this test case did not fail. We recently added the freeing of heap
memory and it uncovered the problem.
2021-04-14 17:16:54 +01:00
Lingkai Dong 6b5e467f96 HeapBlockDevice::erase(): free up heap memory
`HeapBlockDevice::erase()` previously performed a range and alignment
check only. This commit adds freeing of heap memory.
2021-04-14 17:00:17 +01:00
Lingkai Dong 7ef9e6175f HeapBlockDevice: allocate with std::nothrow
Mbed OS does not enable C++ exceptions, so we should call `new` with
`std::nothrow` which returns a C-style NULL pointer when allocation
fails to allow error handling.

For consistency of style within the same file, this commit also
replaces `malloc()` and `free()` to `new (std::nothrow)` and `delete`.
2021-04-14 17:00:17 +01:00
George Psimenos 885cdef5f7 Add standard pin-names validation script & tests 2021-03-18 17:01:53 +00:00
jeromecoutant eca714c93f [STD-PIN] update tests and components 2021-03-18 17:01:50 +00:00
Vikas Katariya 8648e4f4d6 Remove: ARM_MUSCA_A1 support
ARM_MUSCA_A1 is not supported since Mbed OS 6.0
Refer: https://github.com/ARMmbed/mbed-os/pull/13165

Therefore remove files from kv_config and TF-M post binary hook script.
2021-02-25 14:02:56 +00:00
Martin Kojtal e6565a4486
Merge pull request #14031 from arduino/blockdevices_namespaces
BlockDevices: specify mbed namespace where needed
2021-02-04 20:08:07 +00:00
rogeryou 8d00a6f39f modify config file 2021-02-04 15:12:26 +08:00
rogeryou 93b6d5554d add MX25LW51245G_config.h 2021-02-03 16:55:18 +08:00
Rajkumar Kanagaraj 6824b14e48 CMake: rename greentea test macro 2021-02-02 07:43:40 -08:00
Oliver Wildtgrube 6b0215c687 fix namespaces for MBED_NO_GLOBAL_USING_DIRECTIVE feature
added namespaces in various files
2021-02-02 12:49:11 +01:00
Martino Facchin 8ca0e9f161 BlockDevices: specify mbed namespace where needed 2021-02-02 12:49:09 +01:00
rogeryou cc80212970 modify for Travis CI 2021-02-02 10:15:35 +08:00
rogeryou 0db8da1152 modify for the RWW function of Macronix Flash 2021-02-01 17:55:45 +08:00
Martin Kojtal aeabb9382b
Merge pull request #14137 from rajkan01/fix_fatfilesytem_unmount
Storage: Fix FATFileSystem unmount issue
2021-01-20 14:53:24 +00:00
Martin Kojtal 8effecdf29
Merge pull request #14063 from dustin-crossman/pr/wifi_reserved_region
Support arbitrary storage alongside WiFi firmware in external storage on Cypress targets
2021-01-20 08:34:23 +00:00
Rajkumar Kanagaraj a29e3cd5d8 f_mount() (http://www.elm-chan.org/fsw/ff/00index_e.html - third party libary) API is called from both mount() and unmount() Mbed OS APIs.
f_mount() is doing both initializing (via find_volume() -> disk_initialize() where disk_initialize api calls Mbed OS init() function)
underlying block device and register filesystem but in case of "unmount" calls this f_mount is doing deregister filesystem
and missed to a deinitializing block device. So added the Mbed OS "deint()" call in unmount API to deinitialize block device
as f_mount API doesn't have a way to call deinit().
2021-01-15 04:05:25 -08:00
Hugues Kamba 61f2097223 CMake: Add support for Filesystem Greentea tests
The Filesystem Greentea tests can now be built with CMake
2021-01-12 10:59:58 +00:00
Martin Kojtal 025be19d3d
Merge pull request #14090 from hugueskamba/hk_cmake_greentea_blockdevice
CMake: Add support for Blockdevice Greentea tests
2021-01-12 08:22:55 +00:00
Martin Kojtal 5021c01852
Merge pull request #14088 from hugueskamba/hk_cmake_greentea_kvstore
CMake: Add support for KVstore Greentea tests
2021-01-11 11:46:34 +00:00
Martin Kojtal 9c0cfa9a44
Merge pull request #14078 from hugueskamba/hk_rename_ospif_include_dir
CMake: Add support for OSPIF blockdevice
2021-01-05 11:26:43 +00:00
Hugues Kamba d42e9287de CMake: Add support for Blockdevice Greentea tests
The Blockdevice Greentea tests can now be built with CMake
2020-12-24 15:48:02 +00:00
Hugues Kamba 377fba47e2 CMake: Add support for KVstore Greentea tests
The KVstore Greentea tests can now be built with CMake
2020-12-24 14:16:07 +00:00
Hugues Kamba 69b4c13761 CMake: Add Blockdevice dependency to KVstore library
As KVstore relies on BlockDevice add the dependency
in Mbed OS so applications do not have to specify it
2020-12-21 13:57:52 +00:00
Hugues Kamba b99822628b CMake: Add support for OSPIF blockdevice 2020-12-21 13:04:12 +00:00
Hugues Kamba dca2ec7e7a Correct OSPIF include directory
The include directory was incorrectly named QSPIF.
2020-12-21 12:56:45 +00:00
Martin Kojtal 9e5e245abc
Merge pull request #14036 from ahmetalincak/maxim-max32630fthr-SD-configuration
Add SD component and Update SD card SPI interface for Maxim's MAX32630FTHR
2020-12-18 15:11:09 +00:00
Martin Kojtal 569db57d93
Merge pull request #14065 from hugueskamba/hk_cmake_streamline_kvstore
CMake: streamline kvstore support
2020-12-18 14:16:38 +00:00
Martin Kojtal 7f538a4831
Merge pull request #14041 from harmut01/add_spdx_core
Add SPDX identifier to files in storage
2020-12-18 10:30:54 +00:00
Hugues Kamba eedd0b3258 CMake: streamline kvstore support
Link KVStore dependency in Mbed OS so application projects do not have to.
2020-12-17 13:09:38 +00:00
Matthew Macovsky 8c60ce3e32 Create non-public target for Cypress boards with externally-stored WiFi firmware
Targets that inherit from this target will have the defines necessary to
place the WiFi firmware in external storage and enable use of the
external WiFi firmware reserved region block device.
Currently, the only target inheriting from this new target is
CY8CPROTO-062S3-4343W.
2020-12-16 15:31:05 -08:00
Harrison Mutai 9a5ed511fe Add SPDX identifier 2020-12-15 15:01:25 +00:00
Ahmet Alincak b04e7a18c7 Add SD component and Update SD card SPI interface
To support MAX32630FTHR SD card interface implicitly,
target and SD component configurations updated.
2020-12-11 23:51:09 +03:00
Lingkai Dong b829645cc1 BlockDevice design doc: TDBStore no longer requires flash simulation 2020-12-11 14:56:40 +00:00