Commit Graph

64 Commits (refactor_mbed_host_tests)

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
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 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
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
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
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 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
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 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
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 562b31ccd3 Move SFDP unit tests 2020-12-07 12:05:07 +00:00
Lingkai Dong 23702ff2b3 Update include paths to SFDP.h 2020-11-26 17:31:31 +00:00
Lingkai Dong 5d2fbdc11e Move SFDP into blockdevice where it belongs to 2020-11-26 17:31:31 +00:00
Martin Kojtal aea691a67a
Merge pull request #13960 from harmut01/2260_erase_size_const
Add const keyword to get_erase_size declaration
2020-11-26 15:54:07 +00:00
Martin Kojtal 61e4b55a22
Merge pull request #13947 from LDong-Arm/erase_algorithm_fix
Fix erase type determination for [Q/O/]BlockDevice::erase()
2020-11-26 15:53:03 +00:00
Lingkai Dong c41f7cb864 Fix integer type warnings in SFDP and *SPIFBlockDevice 2020-11-26 10:28:58 +00:00
Harrison Mutai 9857a4d63b Add const keyword to get_erase_size declaration
Add const to function declaration. Const objects cannot access const
safe functions, a compiler error is thrown if one tries to do so. This
helps ensure that the object calling the method will not be modified.
This is espescially desirable in functions where all we need to do is
query existing data and not make any alterations.
2020-11-25 13:09:06 +00:00
Martin Kojtal 2f709cc13f
Merge pull request #13896 from jeromecoutant/PR_OSPI
STM32 OSPI support
2020-11-24 13:53:30 +00:00
Martin Kojtal 57bbb4739b
Merge pull request #13085 from pea-pod/remove-deprecated-mbed-assert
Change MBED_STATIC_ASSERTs version for built-in
2020-11-24 13:38:07 +00:00
Lingkai Dong 7525134532 [Q/O/]SPIFBlockDevice: remove logic for unaligned erase, as alignment is checked
[Q/O/SPIFBlockDevice::erase() begin with an alignment check,
after which unaligned erases should not happen or be allowed.

If the erase address is not aligned to the value returned by
sfdp_iterate_next_largest_erase_type(), it indicates an
internal error in erase table parsing which should not be
hidden.
2020-11-23 15:55:24 +00:00
Lingkai Dong 76cf78d654 general_block_device: optimize test_contiguous_erase_write_read() buffer size for large-sector flashes 2020-11-12 14:36:55 +00:00
Lingkai Dong 4a47709cb0 Fix OSPIFBlockDevice program size
From the datasheet of the only OctaSPI flash we currently support
(http://www.mt-system.ru/sites/default/files/docs/Macronix/mx25lm51245g_3v_512mb_v0.01.pdf):

After program/erase command is issued, auto program/erase
algorithms which program/erase and verify the specified page
or sector/block locations will be executed. Program command is
executed on byte basis, or page (256 bytes) basis, or word basis.
Erase command is executed on sector (4K-byte), or block (64K-byte),
or whole chip basis.

So the minimum write size is one byte.
2020-11-12 14:36:55 +00:00
Lingkai Dong 9f3ada3131 Fix printing of contiguous_erase_size 2020-11-12 14:36:55 +00:00
Lingkai Dong c61445a787 QSPIFBlockDevice: fix misconception in minimum program size
Prior to this PR, the minimum program size (QSPI_MIN_PROG_SIZE) of
QSPIFBlockDevice was 256 by default and 512 for some targets.
Those values were in fact page sizes, not program sizes.

Here's an explanation:
* Most QSPI flashes can be programmed to a granularity of a
  single byte or a few bytes - no need to be a whole page.
  This should be the value of QSPI_MIN_PROG_SIZE. Applications
  need to align buffer sizes to this granularity when
  programming QSPI flashes.
* Each sending of the underlying QSPI program signal requires
  destination bytes to be located within the same page.
  If a QSPIFBlockDevice::program() call crosses page boundaries,
  this function breaks down the operation into multiple chunks,
  so it's not a concern for the application.

So this PR changes the default program size to 1 (byte), and
for targets with a 4-byte (1-word) read size it overrides the
program size.

Note: No config is needed for the page size, as it comes from
the SFDP table parsed during initialisation.
2020-11-12 14:36:55 +00:00
Martin Kojtal 65097e1c07
Merge pull request #13878 from evedon/blockdevice-library
Add missing blockdevice mbed_lib.json
2020-11-12 08:44:48 +00:00
jeromecoutant 4cf3a7f0f2 OSPIF: dummy cycles update 2020-11-10 18:38:21 +01:00
Hugues Kamba bf84a5b329 CMake: Rename CMake targets
* mbed-os renamed mbed-core
* mbed-os-<COMPONENT> renamed mbed-<COMPONENT>
2020-11-06 17:25:22 +00:00
Hugues Kamba fa98689639 CMake: Componentize Mbed OS into multiple CMake targets (#13732)
Aside from the core mbed-os CMake target, a number of targets have been created so they can optionally be included by application executables that require them using `target_link_libraries()`.

Co-authored-by: Martin Kojtal <martin.kojtal@arm.com>
Co-authored-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@arm.com>
2020-11-06 17:25:21 +00:00
Martin Kojtal 5a1d64aae5 CMake: Fix blockdevice components source and include paths
This file paths were updated on master and this was broken after
rebasing.
2020-11-06 17:25:19 +00:00
Martin Kojtal 14c6af1558 cmake: fix sd component recent dir structure 2020-11-06 17:25:19 +00:00
Hugues Kamba f12f9adbed CMake: Fix failures due to device_key and storage dirs move 2020-11-06 17:25:19 +00:00
Hugues Kamba a08be8c8a0 CMake: Add support for storage dir 2020-11-06 17:25:15 +00:00
Martin Kojtal 77638f9b72
Merge pull request #13698 from boraozgen/bugfix/spif-read-dummy-bytes
Fix SPIF read dummy cycles not being reset
2020-11-05 15:44:00 +00:00
Evelyne Donnaes f4b7f44d93 Added missing blockdevice mbed_lib.json 2020-11-02 16:35:26 +00:00
pea-pod 507181d262 Change MBED_STATIC_ASSERTs version for built-in 2020-10-27 08:30:40 -05:00
Harrison Mutai 4fad1112e5 Add SPDX license identifier to Arm files
Add license identifier to files which Arm owns the copyright to,
and contain either BSD-3 or Apache-2.0 licenses. This is to address
license errors raised by scancode analysis.
2020-10-15 10:47:27 +01:00