Commit graph

164 commits

Author SHA1 Message Date
Angus Gratton 47bbb107a8 build system: Use CMake-based build system as default when describing commands 2019-07-08 17:31:27 +10:00
Angus Gratton 7ef42f2596 Merge branch 'fix/nvs_util_key_len' into 'master'
nvs_util: Add check for key len in input csv file

See merge request espressif/esp-idf!5392
2019-07-05 10:34:55 +08:00
Shivani Tipnis cc75721f9c mfg_util: Optimise by adding subparser changes w.r.t similar changes in nvs util changes 2019-07-05 01:13:27 +00:00
Shivani Tipnis 84b2fa4c1c nvs_util: Add check for key len in input csv file
Closes https://github.com/espressif/esp-idf/issues/3113
2019-07-05 01:12:41 +00:00
Ivan Grokhotkov c730c9e397 nvs: minor host test fixes
Fixes the tests to pass when some files already exist.
Fixes clean target.
Moves CONFIG_NVS_ENCRYPTION definition into sdkconfig.h.
2019-07-02 10:26:06 +02:00
Ivan Grokhotkov ebcb08ec89 host tests: correct definition of CONFIG_SPI_FLASH_USE_LEGACY_IMPL 2019-07-02 10:10:49 +02:00
Shivani Tipnis 3636e75792 nvs_util: Add NVS decryption feature 2019-06-27 11:51:58 +05:30
Angus Gratton f55ace596b Merge branch 'fix/update_curr_page_state' into 'master'
nvs_util: Set previous page state to full before creating new page

See merge request idf/esp-idf!5325
2019-06-25 14:21:25 +08:00
Shivani Tipnis 1f9f39fe46 nvs_util: Set previous page state to full before creating new page 2019-06-24 13:53:51 +00:00
Renz Christian Bagaporo 9eccd7c082 components: use new component registration api 2019-06-21 19:53:29 +08:00
Kirill Chalov 4faf2de035 Doc/review api ref storage 2019-06-17 14:23:52 +08:00
MartinValik 5268960235 Added support for NVS iterators
Closes https://github.com/espressif/esp-idf/issues/129
2019-06-10 16:42:39 +02:00
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