Commit Graph

270 Commits (7794d901f2be0737c02fa30fdae0b9ddf59dadf3)

Author SHA1 Message Date
Martin Kojtal a927ab8f7c
Merge pull request #11789 from jeromecoutant/PR_STM32H7
STM32H7: code and feature alignment for both NUCLEO and DISCO targets
2019-11-04 09:48:09 +01:00
Veijo Pesonen b01fe020cd Deprecates NVStore 2019-10-31 14:54:54 +02:00
jeromecoutant d7d0d0b8cb STM32H7 FLASH and DEVICE_KEY
- Enable FLASHIAP for all H7 boards
- Use "TDB_INTERNAL" for all H7 boards
- Define specific internal_base_address only for DISCO_H747I_CM7
  (default address is the end of FLASH which is correct for other H7 boards)
- Correct GetSectorBase function with Dual Bank information
2019-10-31 13:04:49 +01:00
Janne Kiiskila 3ab36cb934 Add default TDBStore location for DISCO_H747I (end of BANK1)
Place it at the end of the bank1, last two erase sectors.
As erase sector is 128 kB, default size must be double of that.

This can't be in bank2 as that is apparently dedicated to the M4 core.

Memory map is available in;

https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/flash_data.h

Memory map does not have this information, but issue [11617](https://github.com/ARMmbed/mbed-os/issues/11617) has.
2019-10-30 15:25:13 +02:00
Janne Kiiskila 655274a16e DISCO_H747I - define default storage (TDB_INTERNAL)
DeviceKey needs the definition of the default storage place,
define it to be TDB_INTERNAL (as for the other boards).
2019-10-30 15:25:13 +02:00
midd 6fbc610448 Update the internal kvstore size to from 7k to 65K for device that use the internal flash for kvstore 2019-10-23 12:26:07 -07:00
Martin Kojtal bb48dd35c6
Merge pull request #11624 from geky/littlefs-v1.7.2
LittleFS: Update to v1.7.2
2019-10-23 14:55:10 +02:00
Martin Kojtal fcd40ab1a5
Merge pull request #11628 from kyle-cypress/pr/directaccess-devicekey-test
Make devicekey remainder test more meaningful
2019-10-15 21:41:05 +08:00
Anna Bridge 489c30f569
Merge pull request #11297 from kyle-cypress/pr/qspi-dummy-cycles
Differentiate alt and dummy cycles in QSPIF
2019-10-11 14:34:17 +01:00
Kyle Kearney 1cb6f7b31c Make devicekey remainder test more meaningful
As of 722628be02, the "remainder" configuration
also uses the default location near the end of flash. Which makes the two tests
nearly identical with the exception that the "last two sectors" test correctly
handles parts with a low (possibly 1:1) erase size to program size ratio.
Therefore, change the "remainder" test to instead be a "default" test that uses
the tdb_internal_address/size values, so that it
a.) tests something meaningfully different and
b.) tests using the custom TDB address/size values if they are provided.
c.) functions correctly on devices where the default sector-based size computation
    does not work (e.g. because of the low erase size to program size ratio)
    and therefore a custom location and size has been specified.
The is_conf_tdb_internal variable is unused and therefore removed.
2019-10-03 16:04:30 -07:00
Christopher Haster de8df75ec0 Merge commit '70cb12e72bef7a1f220b0e5f21457b6930d984b2' into littlefs-v1.7.2 2019-10-03 09:56:09 -05:00
Matthew Macovsky baf375f8cb Allow for arbitrary QSPI alt sizes
The QSPI spec allows alt to be any size that is a multiple of the
number of data lines. For example, Micron's N25Q128A uses only a
single alt cycle for all read modes (1, 2, or 4 bits depending on
how many data lines are in use).
2019-09-30 14:45:08 -07:00
Seppo Takalo 513891d4f6 Check return of BlockDevice::init() in TDBStore.
Return value was ignored, and TDBStore:init() ended up in a
MBED_ERROR() phase after that.

TDBStore API was limited to allow returning of only two separate
errors, which may end up hiding the actual return value. Change
the documentation slightly to allow returning of original error
code from the underlying block device.

Fixes #11591
2019-09-30 13:26:56 +03:00
Kyle Kearney 832c69b1a6 Explicitly set tdb internal flash size for PSOC6
The default computation assumes that a flash sector is several times
larger than a flash page. On PSoC 6 targets this is not the case
(the two values are the same) so the computed size is too small.
This is a similar change to 1b1f14d36b,
but for devices which implement TDB in internal storage.
2019-09-24 11:31:04 -07:00
Hugues Kamba e65a0c0a99 Remove minor build warnings 2019-09-02 15:04:58 +01:00
Roman Okhrimenko ed9995e06c PSOC6_SB: Initial commit to add CY8CPROTO_064_SB to mbed-os sources. 2019-08-30 15:10:18 +03:00
Martin Kojtal 9203c88b1e
Merge pull request #11275 from VeijoPesonen/disable_nvstore
Enable building feature storage with a bare metal profile
2019-08-29 17:05:54 +02:00
Veijo Pesonen 155f04713a Revert "Sets NVStore disabled by default"
This reverts commit bda7678071.
2019-08-29 14:50:40 +03:00
Martin Kojtal 453122944c
Merge pull request #11366 from 0xc0170/dev_rollup
Rollup part 2 for 5.14
2019-08-29 09:28:49 +02:00
Martin Kojtal c4a2e3f879
Merge pull request #11349 from VeijoPesonen/tdbstore_ecc_fix
TDBStore bugfix: won't rely on flash erase value to detect is a sector erased
2019-08-29 08:38:48 +02:00
Martin Kojtal 206e52c574 Merge branch 'pr/tdbstore-missing-offset' of git://github.com/kyle-cypress/mbed-os into dev_rollup 2019-08-28 18:37:02 +01:00
Vairamuthu Ramasamy 782734cae2 Added MBED_CONF_ prefix to QSPI pins, GitHub issue# 10060 2019-08-28 13:12:07 +01:00
Kyle Kearney 5820a3172f Fix typos in comments 2019-08-28 13:12:05 +01:00
Jammu Kekkonen 86640e5bfe Bugfix: won't rely on erase value to detect is a sector erased
When flashing a binary STLink won't skip writing padding which happens
to be the same value as flash's erase value. STM32L4 based targets
have an additional 8-bit of embedded ECC for each 64-bit word of data.
The initial value, when a sector is erased, for the ECC bits is 0xFF.
When you write the erase value to a given address these bits gets
modified to something different due to the ECC algoritm in use. The
visible bits are intact but difference in ECC value prevents flipping
any 1's to 0's. Only way to proceed is to erase the whole sector.
2019-08-27 15:39:47 +03:00
Martin Kojtal b005bf2133
Merge pull request #11269 from michalpasztamobica/coverity_fixes
storage: fix potential memory corruption and check return values
2019-08-23 15:49:14 +02:00
Martin Kojtal 3fb5802b19
Merge pull request #11298 from kyle-cypress/pr/kvstore-flash-size
Explicitly set rbp_internal_size for TARGET_PSOC6
2019-08-23 15:44:09 +02:00
Matthew Macovsky 1b1f14d36b Explicitly set rbp_internal_size for TARGET_PSOC6
The default computation assumes that a flash sector is several times
larger than a flash page. On PSoC 6 targets this is not the case
(the two values are the same) so the computed size is too small.
2019-08-22 17:41:25 -07:00
Kyle Kearney 06dd330320 Fix missing offset in TBStore read from flash
This could cause incomplete data retrieval and mismatch when reading
data in more than one chunk, because every chunk would be read to the
same location at the beginning of the output buffer.
2019-08-22 17:07:24 -07:00
Janne Kiiskila f149b4c309 IAR / FATFS - Pe029 error
IAR compilation fails at `_fs = { 0 };` due to

```
[Error] FATFileSystem.cpp@285,0: [Pe029]: expected an expression
```

Changing that object initializer list instead, as that seems
to pass IAR compilation, too.

Changed original memset to object initialiser list based on review
feedback from Kevin Bracey.
2019-08-22 10:58:35 +03:00
Janne Kiiskila 4ad24c0dc2 FATFS - Fix copyright year
It's 2019 now.
2019-08-22 10:58:35 +03:00
Veijo Pesonen 8d44d8c130 Enables building storage with bare metal profile
To compile Mbed Bootloader with bare metal profile certain defines are
not added anymore automatically. Because of this checks for those
defines needed to be introduced.
2019-08-21 12:22:34 +03:00
Veijo Pesonen bda7678071 Sets NVStore disabled by default 2019-08-21 10:32:00 +03:00
Michal Paszta 5a9183c549 storage: fix potential memory corruption and check return values 2019-08-21 09:26:35 +03:00
Martin Kojtal 5904614696
Merge pull request #11183 from OpenNuvoton/nuvoton_m252kg_test
M252KG: Fix kvstore-static_tests failing with OOM
2019-08-20 09:49:58 +02:00
Martin Kojtal 2e09a27e05
Merge pull request #11165 from VeijoPesonen/fix_internal_kvstore_config
Allows placing KVStore and update images on separate storage devices - to internal and external flash
2019-08-19 11:46:39 +02:00
Chun-Chieh Li 500221c6a0 Fix kvstore-static_tests failing with OOM
Forked 3 threads plus misc, so minimum (4 * OS_STACK_SIZE) heap are required.
2019-08-15 17:53:31 +08:00
Veijo Pesonen 722628be02 [TDBStore] changes the default TDBStore location
Thus far the default position has been after the application plus two
spare sectors. For simplicity and to have a predictable location for the
TDBStore with the default configuration the location is now switched to
the end of the flash. Two last sectors to be exact.
2019-08-15 09:26:57 +03:00
Michal Paszta 406fcdc9b7 FATFileSystem::stat() enabled for all compilers
Macro which restricted compilation to GCC_ARM is removed.
Existing read_write() test is amended to call stat() and check that correct size is returned.
2019-08-09 15:52:49 +03:00
Seppo Takalo a5e3336c19 Zero initialise all NVStore&kvstore members 2019-08-07 14:17:15 +03:00
Michal Paszta 73b122b2c4 Coverity and compilation warnings fixes 2019-08-07 10:30:52 +03:00
Veijo Pesonen 9222e15848 Allows having KVStore in internal and update image in external flash
Fixes a bug where it has not been possible to have KVStore in internal
flash while an update image image has been kept in external storage.
2019-08-06 09:49:14 +03:00
Seppo Takalo 818c1d6f0f
Merge pull request #11130 from Tharazi97/NotSupportedTest
Updated testcases
2019-08-02 13:27:54 +03:00
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