The findItem method was improved to use a hash list in RAM when searching for BLOB data chunks
The findItem method was extended with a parameter that returns the position of an item on the page,
if it is found
The algorithm for matching existing variable-length data (such as strings and BLOBs) with
new values was enhanced by comparing the CRC32 of the data chunks before reading the data from flash
Function now always rewrites old value under same key
regardless existing data type. Users requiring old API behaviour
can enable it by kconfig option CONFIG_NVS_LEGACY_DUP_KEYS_COMPATIBILITY
Write only till the embedded file size in the NVS partition. Earlier
the length was kept as the whole partition size and it could result
in accessing embedded rodata beyond the MMU mapped range.
The condition enabling use of hash map when page is searched for Item was modified
to correct the bug introduced by commit addressing delete of any BLOB_INDEX Items.
This correction returns the performance of findItem to the state before previous change.
* nvs_page_test runs into timeout in CI. According to log,
test ran run around halfway, so increasing from 10 to 90 seconds.
* Also increased timeout of nvs_host_test, just to be sure
This fixes the issue that "idf.py partition-table" had to be run
manually in order for the partition table to be generated, when
building for linux target.
Host tests of nvs_flash eligible to run in Linux implementation of nvs flash were migrated. Remaining test cases
were left in original folder. Migrated test cases use CMake instead of make.
All the partition handling API functions and data-types were moved from the 'spi_flash' component to the new one named 'esp_partition'. See Storage 5.x migration guide for more details
Unlike COMPILE_OPTIONS, COMPILE_DEFINITIONS CMake property assumes
values without the -D prefix, such as NAME or NAME=VAL.
Previously, IDF build system was passing COMPILE_DEFINITIONS build
property to CMake COMPILE_OPTIONS property, so -D prefix was not
a problem.
Now that COMPILE_DEFINITIONS CMake property is used, -D prefix has
to be removed.
(Note that this doesn't affect 'target_compile_definitions' function,
which strips -D prefix before adding the definition to the property.)
spi_flash driver knows how to write data from cache (DROM or PSRAM)
into flash, so the extra check in nvs_flash is unnecessary.
Besides, the hardcoded address limit (0x3ff00000) is wrong for some
of the newer chips.