Commit graph

152 commits

Author SHA1 Message Date
Angus Gratton
154fc74f76 Merge branch 'bugfix/nvs_typedef_naming_pr3239' into 'master'
nvs: Append _t to nvs_handle & nvs_open_mode types

Closes IDFGH-891

See merge request idf/esp-idf!4783
2019-05-29 08:14:00 +08:00
Angus Gratton
b2e54a9cc6 ci: Add IDF_DEPRECATED macro for things we only deprecate in our CI passes 2019-05-27 17:43:38 +10:00
GOPTIONS\pfrost
897bb55482 nvs: Append _t to nvs_handle & nvs_open_mode types
Merges https://github.com/espressif/esp-idf/pull/3239/
2019-05-22 02:53:28 +00:00
Roland Dobai
1ad2283641 Rename Kconfig options (components/bootloader) 2019-05-21 09:32:55 +02:00
Tim Nordell
c3fa2497b9 nvs: Check if an item is modified before writing out an identical copy
This prevents wear and tear on the flash, and it also is faster in some
cases since the read-out of flash is a cheaper operation than the erasure
of flash.  Some library modules (such as the esp_wifi) write out to NVS
upon every initialization without checking first that the existing value
is the same, and this speeds up initialization of modules that make
these design choices and moves it into a centralized place.

The comparison functions are based on the read-out functions of the same
name, and changes out the memcpy(...) operations for memcmp(...)
operations.

Signed-off-by: Tim Nordell <tim.nordell@nimbelink.com>
2019-04-30 11:39:58 -05:00
negativekelvin
9a319772e1 nvs_flash: Multi-page blob erased using nvs_erase_key should be cleaned properly
Earlier eraseItem function in Storage class would do lazy cleanup of
multi-page blobs if called using type "ANY" instead of "BLOB". It used to
just delete BLOB data and index would remain as is. Any subsequent read
would delete index entry as well. This however would return a valid
length without error if nvs_get_blob API was just used for finding
length and not reading the complete blob. This change fixes this issue.

Closes https://github.com/espressif/esp-idf/issues/3255
2019-04-10 11:45:29 +00:00
Shivani Tipnis
a88b40483d mfg_util: Add changes to mfg_util as per changes in nvs_util
revert changeson this file

Update README for mfg util

Update to correct coding style of script
2019-04-03 11:31:49 +05:30
Shivani Tipnis
66e38e9bac nvs_util: Add support to include comments in csv file
Closes https://github.com/espressif/esp-idf/issues/2965
2019-04-01 16:52:43 +05:30
Shivani Tipnis
cd8c42600c nvs_util: Add support for creation of unique encryption keys 2019-03-28 05:06:12 +00:00
Tim Nordell
eb5abca23d nvs_flash: Fix typo in README.rst
Merges https://github.com/espressif/esp-idf/pull/3216

This should read "except for the new key-value pair" instead of
"expect for the new key-value pair".

Signed-off-by: Tim Nordell <tim.nordell@nimbelink.com>
2019-03-24 19:56:10 +01:00
Ivan Grokhotkov
940a1f6e79 Merge branch 'feature/separate_rom_from_esp32' into 'master'
separate rom from esp32 component to esp_rom

Closes IDF-542

See merge request idf/esp-idf!4500
2019-03-21 22:10:45 +08:00
morris
c159984264 separate rom from esp32 component to esp_rom
1. separate rom include files and linkscript to esp_rom
2. modefiy "include rom/xxx.h" to "include esp32/rom/xxx.h"
3. Forward compatible
4. update mqtt
2019-03-21 18:51:45 +08:00
Shivani Tipnis
60b5cdde20 nvs_util: Fix to support write of multiple singlepage big blob data
Closes https://github.com/espressif/esp-idf/issues/3011
2019-03-20 08:15:36 +00:00
Ivan Grokhotkov
dae40f4ff1 nvs: add a blob fragmentation test case
Ref. TW12937
2019-02-26 01:58:20 +00:00
Ivan Grokhotkov
02a76abb8b nvs: do eager cleanup of HashListBlocks
Previously when HashList was removing items, HashListBlocks were
removed lazily. This resulted in empty HashListBlocks dangling around
in full pages, even when all items have been erased. These blocks
would only be deleted when NVS was re-initialized
(nvs_flash_deinit/nvs_flash_init).

This change does eager cleanup instead, based on the code from
@negativekelvin offered in
https://github.com/espressif/esp-idf/issues/1642#issuecomment-367227994.

Closes https://github.com/espressif/esp-idf/issues/1642.
2019-02-26 01:58:20 +00:00
Sagar Bijwe
d32128440d nvs_flash: Detect key partition as uninitialised even if encrypted by bootloader
Currently, only erase operation performed by the application leads
to detection of NVS key partition as uninitialised. This change
adds additional checks for detecting partition as uninitialised,
when device boots first time right after encryption by bootloader.
2019-02-01 13:28:13 +05:30
Roland Dobai
37126d3451 Correct Kconfigs according to the coding style 2019-01-29 13:37:01 +01:00
Gautier Seidel
b4c4f8514b nvs_flash: Improve nvs_flash_init_partition() speed
Signed-off-by: Sagar Bijwe <sagar@espressif.com>
2019-01-23 04:53:36 +00:00
Martin Válik
602d102403 Added support for NVS in console example 2019-01-11 09:51:50 +08:00
Sagar Bijwe
fc37dc1944 nvs_flash: Fix compilation of host testcases when g++-8.x is used.
When std::bind is used, it requires inclusion of <functional> header.
This was not mandatory with earlier versions of g++ (4.x), may be because they
had experimental support for c++11.
2018-12-07 09:40:45 +00:00
Shivani Tipnis
0c72b08872 nvs_util: update test case 2018-11-21 13:40:24 +05:30
Shivani Tipnis
582c547191 Update README 2018-11-21 12:55:47 +05:30
Shivani Tipnis
c44f15441f Closes https://github.com/espressif/esp-idf/issues/2472 2018-11-21 12:55:47 +05:30
Shivani Tipnis
9db1987892 nvs_util: Add changes to nvs part gen util
nvs_util: Add changes to nvs part gen util

nvs_host_test: Add test case for keygen and keyfile paratmeters
2018-11-21 12:55:47 +05:30
Ivan Grokhotkov
6091021e83 unity: separate common and IDF specific functionality
New unity component can be used for testing other applications.
Upstream version of Unity is included as a submodule.
Utilities specific to ESP-IDF unit tests (partitions, leak checking
setup/teardown functions, etc) are kept only in unit-test-app.
Kconfig options are added to allow disabling certain Unity features.
2018-11-19 12:36:31 +08:00
Renz Bagaporo
cc774111bf cmake: Add support for test build 2018-10-20 12:07:24 +08:00
Shivani Tipnis
7c08fcccaf util: Update docs as per review comments 2018-10-12 11:04:49 +05:30
Shivani Tipnis
5bee9faf49 tools: Add Python2 and Python3 compatibility support to nvs util tool and mfg tool 2018-10-12 11:04:49 +05:30
Shivani Tipnis
1d38d8a17f nvs_util: Add Python2 and Python3 compatible 2018-10-12 11:04:49 +05:30
Shivani Tipnis
0f6bcec2bc nvs_part_gen: Add changes to partition size input 2018-10-12 11:04:49 +05:30
Shivani Tipnis
60df21115e nvs_part_gen: Update to make python version compatible
(cherry picked from commit 3506b2d60792e5d4ed4f744b28f2da6733c6aae7)
2018-10-12 11:04:49 +05:30
Shivani Tipnis
1460f03065 nvs_util: Add Python2 and Python3 compatible 2018-10-12 11:04:49 +05:30
Shivani Tipnis
fb31788504 nvs_part_gen: Add changes to partition size input 2018-10-12 11:04:49 +05:30
Shivani Tipnis
4bc87a414f nvs_part_gen: Update to make python version compatible
(cherry picked from commit 3506b2d60792e5d4ed4f744b28f2da6733c6aae7)
2018-10-12 11:04:49 +05:30
Sagar Bijwe
454b69d2ea nvs_flash: Update documentation at different places to indicate NVS encryotion is supported 2018-10-05 14:05:21 +05:30
Angus Gratton
a4aadd1926 Merge branch 'feature/nvs_encryption' into 'master'
nvs_flash: Add support for nvs encryption

See merge request idf/esp-idf!2700
2018-09-25 08:15:55 +08:00
Shivani Tipnis
7c1360b10a nvs_util: Fix multipage blob data format generate 2018-09-24 15:44:31 +05:30
Sagar Bijwe
48fccbf5dd nvs_flash: Add support for nvs encryption 2018-09-24 11:25:21 +05:30
Angus Gratton
4d50427e87 Merge branch 'feature/nvs_util_backport' into 'master'
nvs_util: Add changes for utility to support old and new multipage blob

See merge request idf/esp-idf!3270
2018-09-24 11:53:29 +08:00
Shivani Tipnis
ca3acef82c nvs_util: Add support for old and new multipage blob 2018-09-19 22:00:08 +05:30
Roland Dobai
7183112cc4 nvs_flash: fix division for Python 2 & 3 2018-09-17 16:01:54 +02:00
Renz Christian Bagaporo
d9939cedd9 cmake: make main a component again 2018-09-11 09:44:12 +08:00
Angus Gratton
cff2ef695a Merge branch 'master' into feature/cmake 2018-09-06 20:23:04 +08:00
Sagar Bijwe
db7c257f33 nvs_flash: Minor changes to NVS documentation
1) Change API doc to reflect new limits on string and blob length.
2) Add "version" field to Page Header structure in README.

Fixes: https://github.com/espressif/esp-idf/issues/2321
2018-09-04 18:51:31 +05:30
Angus Gratton
a9c4ed7139 Merge branch 'master' into feature/cmake 2018-08-30 18:51:01 +08:00
Sagar Bijwe
911f96ad21 nvs_flash: Fix nvs_set_blob hang when partition is near to FULL
Marking a page full does not skip it from page selection process and the
same page might get returned if there is no other page with more unused
entries. Added a check for the same while storing blobs.

Fixes: https://github.com/espressif/esp-idf/issues/2313
2018-08-21 17:08:46 +05:30
Angus Gratton
3012b0f887 Merge branch 'feature/nvs_multi_page_util' into 'master'
Bugfix: multi page blob creation was failing if only one entry was left in page

See merge request idf/esp-idf!2971
2018-08-16 15:23:11 +08:00
Angus Gratton
ff2404a272 Merge branch 'master' into feature/cmake 2018-08-16 17:14:17 +10:00
Shivani Tipnis
dfde105f25 Add support for input custom partition size 2018-08-16 11:54:46 +05:30
Shivani Tipnis
5ce40fce0c Add nvs part gen utility multi page blob support update 2018-08-16 11:46:25 +05:30