Commit Graph

17 Commits (7c17693c06dd3be022b36a58e86b10520ab81ec2)

Author SHA1 Message Date
Martino Facchin 8ca0e9f161 BlockDevices: specify mbed namespace where needed 2021-02-02 12:49:09 +01:00
Lingkai Dong 23702ff2b3 Update include paths to SFDP.h 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
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
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 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
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
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
Lingkai Dong 61fd872cc3 QSPIF: options to preset reset sequence for legacy SFDP
The first revision (1.0) of SFDP (ref: JESD216) does not include
fields for software reset support. It's only been added in the
second revision (1.5) (ref: JESD216A).

Some Mbed OS targets such as DISCO_F746NG include flashes with
legacy SFDP, thus we add an option to preset the reset mode.
2020-08-21 11:37:47 +01:00
Rajkumar Kanagaraj ef18003588 Rename to more readable include header directory component name 2020-08-18 13:10:50 +01:00
Rajkumar Kanagaraj bf58572c4d Refactor storage COMPONENT_xx directory 2020-08-17 16:44:05 +01:00
Rajkumar Kanagaraj e92efbd800 Update the header file reference 2020-07-17 03:10:58 -07:00
Rajkumar Kanagaraj 0bcf967870 Storage directory restructure:
- Move mbed-os/features/storage to mbed-os/storage
- Move components/storage/blockdevice to storage/blockdevice/COMPONENT_xxx
2020-07-10 14:59:53 +01:00