Commit Graph

58 Commits (4e6cbb8f5f94a3a3e40c316e15b7151c3c696d8f)

Author SHA1 Message Date
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
David Saada ff7858a306 Fix is_valid_erase function to use get_erase_size with address 2018-09-03 16:15:54 +03:00
Deepika 683034db8a Use the same API name to add mbed CRC: lfs_crc 2018-09-02 15:25:41 -05:00
Deepika 4d7fdfc2a9 Use MbedCRC for LittleFS (0xEDB88320)
CRC used in LittleFS is Reversed ANSI, hence new polynomial added.
Reversed polynomials perform shift in reverse direction of standard
polynomial, and we do not have option to notify reverse shift to hardware.
Hence this option is available in software only.
2018-09-02 15:25:40 -05:00
Yossi Levy c1eb141def Changing general_filesystem test to be more efficient. now format is done once at the beginning and once at the end while every test clean its resource before the next test. Testing time on SD should be drop form 10 minutes plus to less than 1 minute 2018-08-31 18:33:08 +03:00
Yossi Levy ed8e170d15 Moving SD, SPIF and FLASHIAP into mbedos and refactoring features storage directory structure. 2018-08-29 12:01:11 +03:00
Oren Cohen 787317b7eb Remove uVisor from mbed-os 2018-08-22 16:36:59 +03:00
Brendan McDonnell c4f10aafee typos 2018-02-20 20:11:19 -05:00
Jimmy Brisson 922bf1b619 Update mbed OS to handle ARMC6 requirements 2017-09-11 13:20:32 -05:00
Deepika 6c1ad4a4e4 Use correct IAR toolchain macro 2017-09-06 09:51:16 -05:00
Deepika 818f82c5bd Typecasting to int to resolve warning:#68-D: integer conversion resulted in a change of sign 2017-06-15 11:50:52 -05:00
Russ Butler 0de35e2a21 Fix config store deprecation warnings
Silence deprecation warnings in the config store C and C++ files. This
removes warnings that not relevant to applications. Note - using
these deprecated functions still gives an error outside of these files.
2017-06-05 18:06:10 -05:00
Russ Butler 58041a215d Deprecate config store and related libraries
Deprecate configuration-store, flash-journal and
storage-volume-manager for the 5.5 release. Also disable the
storage tests.
2017-05-31 12:08:11 -05:00
Simon D Hughes a09ad071e6 Corrections of debug trace statements which prevent compilation when CFSTORE_DEBUG is defined. 2016-12-05 15:29:22 +00:00
Simon Hughes 46411f7f73 CFSTORE issue 3327: fix to build CFSTORE SRAM mode (disabling flash storage). 2016-11-28 16:09:00 +00:00
Mahadevan Mahesh ac9668a498 Update tests to fix build failures. Also make the code similar to other tests
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-11-02 11:45:14 -05:00
Marcus Chang 8876b7ef38 Removed static declaration for the StorageVolumeManager in the CFStore because this componenent is shared across all users of the flash. Added define guards to the CFStore location and size so that these can be changed from the settings file. 2016-10-27 10:26:28 +01:00
Russ Butler 3601b5ebb3 CFSTORE - Fix test failures due to fragmentation
In the config store create test in test case #5 the amount of available
memory is determined by fully allocating the heap. This is done
multiple times to determine if there is a memory leak. This causes
problems when even slight fragmentation occurs in the heap, since
the size that can be allocated is decreased slightly, which the test
flags as a memory leak.

This patch makes memory leak detection more robust by using metrics
provided by mbed_stats_heap_get. These metrics are an exact
measurement of memory allocated is not changed by fragmentation.
This allows the memory leak test to report correct values regardless of
fragmentation.
2016-10-17 21:08:57 -05:00
Russ Butler 9f0e756e28 CFSTORE - Delete handle even if key ref non zero
When closing a file handle remove the handle from the handle list
regardless of what the reference count of the key it is pointing to is.
This prevents config store from keeping a handle to file handles that
have gone out of scope.
2016-10-16 20:47:43 -05:00
Russ Butler c908666d63 CFSTORE - fix handling of realloc fail on delete
The function cfstore_delete_ex is written under the assumption that
CFSTORE_REALLOC will never fail if the size is decreasing. Regardless
of the status of CFSTORE_REALLOC the entry is removed from the config
store and zeroed. This works correctly if CFSTORE_REALLOC correctly
updates area_0_tail, but can lead to crashes in the case area_0_tail is
left unchanged. The crash is because when iterating over the config
store data, cfstore_get_next_hkvt is unable to determine the end of
valid data.

This patch fixes this problem by handling the realloc failure case by
updating area_0_tail even if CFSTORE_REALLOC returns NULL. This
patch also adds an assert to check for out of bound entries in when
calling cfstore_get_next_hkvt. This allows an assert to be triggered
if this bug is re-introduced, rather than a crash.
2016-10-16 20:47:42 -05:00
Russ Butler de8ce0e43e CFSTORE - Fix crashed due to uninit data
When the config store is powered down area_0_head is freed, but
area_0_len is not set to 0. This causes when cfstore_realloc_ex is
called, since on the first allocation it appears that the config store
size is decreasing, and therefore the data is not initialized.

Since the data is uninitiated various fields such as the reference
can have invalid values. On GCC_ARM built with heap stats enabled
this manifests as a crash due to an invalid reference count.

This patch fixes this problem by setting area_0_len to 0 when the data
is freed.
2016-10-16 20:47:40 -05:00