Commit Graph

335 Commits

Author SHA1 Message Date
harshal.patil
330f3edf11
fix(nvs_flash): Fix the memory leak in the nvs_flash test app
The leak is now reduced by allocating the AES interrupt and
loading the partitions in the test setup instead of in the tests itself.
2023-11-27 17:25:14 +05:30
Mo Fei Fei
a82b6f5c0b Merge branch 'docs/update_cn_trans_nvs_part_gen_readme' into 'master'
Docs: Update CN trans for components/nvs_flash/nvs_partition_generator/README.rst

Closes DOC-6449

See merge request espressif/esp-idf!26589
2023-10-26 12:19:26 +08:00
Mo Fei Fei
4f24d3a39c Docs: Update CN trans for components/nvs_flash/nvs_partition_generator/README.rst 2023-10-26 12:19:25 +08:00
Adam Múdry
e151184da7 refactor: Remove -Wno-format from storage related components 2023-10-22 17:56:41 +00:00
Adam Múdry
6154f22ab3 docs: nvs_open* add ESP_ERR_INVALID_ARG to return description
ESP_ERR_INVALID_ARG is returned from underlying functions but this was not easily evident
2023-10-19 14:36:10 +02:00
radek.tandler
d4aa9ccb0c change(nvs_flash): Host tests were migrated from CMock to esp_partition linux emulation 2023-10-13 13:17:28 +02:00
Martin Vychodil
64befdca3a Merge branch 'feature/partition_readonly_flag' into 'master'
feat(partition_table): Add read-only partition flag and functionality

Closes IDF-6421

See merge request espressif/esp-idf!24855
2023-10-13 11:11:07 +08:00
Laukik Hase
239bc3b96f Merge branch 'fix/nvs_part_gen_docs' into 'master'
fix(docs/nvs_part_gen): Show the NVS HMAC encryption scheme-specific commands only for supported SOCs

See merge request espressif/esp-idf!26332
2023-10-11 20:56:54 +08:00
Adam Múdry
ab1eb37fe8 feat(partition_table): Add read-only partition flag and functionality 2023-10-11 00:01:05 +02:00
Adam Múdry
d42bde0378 feat(nvs): NVS tool add key consistency check 2023-10-09 15:58:48 +02:00
Adam Múdry
c276e2ca05 refactor: NVS tool move integrity check from logger to another file 2023-10-09 15:58:48 +02:00
Laukik Hase
6c9a343e1b
fix(docs/nvs_part_gen): Show the HMAC scheme-specific commands only for supported SOCs 2023-10-06 11:33:12 +05:30
radek.tandler
4f659b70e1 fix(nvs_flash): fixed failing nvs_page test 2023-09-26 15:05:20 +00:00
radek.tandler
e8992f500c fix(nvs_flash): nvs_set with same key and different data type
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
2023-09-26 15:05:20 +00:00
radek.tandler
f693b78f93 feature(nvs_flash) : added support iteration over namespace by index - review changes 2023-08-29 16:05:02 +02:00
Ivan Grokhotkov
92ff04ebea nvs: use 'handle' argument name for consistency 2023-08-29 13:59:34 +02:00
Cody P Schafer
f2af1c5305 nvs: support iteration over namespace by index
Users of the nvs API are likely to have `nvs_handle_t` in all cases, but
not all of them carry around the partition name and namespace name (as
they aren't needed after creating an `nvs_handle_t`).

Allow this common case to use nvs iteration without them tracking
additional data by using the `nvs_handle_t` to locate the namespace
index and the partition name by introducing an alterate to
`nvs_entry_find` called `nvs_entry_find_in_handle`, which operates
similarly except that it is given a `nvs_handle_t` instead of partition
and namespace strings.

This is somewhat more limited than the `nvs_entry_find` API as one
cannot examine all keys in a given partition.
2023-08-29 13:59:34 +02:00
Martin Vychodil
e44d4260ad Merge branch 'feature/storage_host_test_nvs_flash2' into 'master'
nvs_flash: finished migration of host tests to the linux emulator of esp_partition

See merge request espressif/esp-idf!23926
2023-08-28 20:20:16 +08:00
Armando
7dbd3f6909 feat(ci): Enable p4 example, test_apps and unit tests CI build 2023-08-24 12:51:19 +08:00
Adam Múdry
42ac85a6a1 Merge branch 'contrib/github_pr_11926' into 'master'
Support NVS image generation from CMake (GitHub PR)

Closes IDFGH-10702 and IDFGH-10542

See merge request espressif/esp-idf!25102
2023-08-15 00:20:11 +08:00
radek.tandler
28f82d8de7 refactor(nvs_flash): Host test migrated to esp_partition emulation for linux 2023-08-09 14:14:21 +02:00
radek.tandler
3ffb8f8ffd nvs: nvs_get_stats fixed test, improved comment 2023-08-08 08:43:19 +02:00
radek.tandler
ac6c03fad1 change(nvs_flash): nvs_get_stats extended, API documentation improved 2023-08-08 08:43:19 +02:00
Vincent Hamp
d975a26666 feat: Add support for NVS image generation from CMake
Closes: https://github.com/espressif/esp-idf/pull/11926
Closes: https://github.com/espressif/esp-idf/pull/11785

Co-authored-by: Nebojša Cvetković <nebkat@gmail.com>
2023-07-31 18:26:06 +02:00
Wang Zi Yan
3e4152cdcf docs: Update CN for nvs_flash.rst and flash-encryption.rst 2023-07-14 04:05:53 +00:00
Adam Múdry
098cab35e4 NVS: nvs_tool.py entry.data None check fix 2023-06-21 11:23:22 +02:00
KonstantinKondrashov
e72061695e all: Removes unnecessary newline character in logs
Closes https://github.com/espressif/esp-idf/issues/11465
2023-06-09 03:31:21 +08:00
Laukik Hase
72f703ccd4
nvs_flash: Extended test-app and host tests for the HMAC-based NVS encr-keys protection scheme 2023-05-23 13:55:59 +05:30
Laukik Hase
a06118012e
docs: Update nvs_flash docs for the HMAC-based NVS encr-keys protection scheme
- Also updated the `nvs_partition_generator` and `mass_mfg` tools
  documentation
2023-05-23 13:55:57 +05:30
Laukik Hase
9ac87fcc8b
nvs_partition_gen/mass_mfg: Support for HMAC-based scheme for generating NVS encr-keys 2023-05-23 13:55:55 +05:30
Laukik Hase
c1bed366ba
nvs_flash: Add support for HMAC-based NVS encryption keys protection scheme
- This features allows the NVS encryption keys to be derived and protected using
  the HMAC peripheral. Since the encryption keys are derived at runtime, they
  are not stored anywhere in the flash and hence this feature does not require
  a separate `nvs_keys` partition.
2023-05-23 13:55:52 +05:30
Linda
65ee4992ce docs: update the algorithm and key name from AES-XTS to XTS-AES 2023-05-15 17:54:50 +08:00
Laukik Hase
4ac95a33fd
nvs_flash: Migrate UTs to component test-apps 2023-04-26 10:21:03 +05:30
Ivan Grokhotkov
2a28061eaa Merge branch 'contrib/github_pr_11117' into 'master'
test_nvs_host: fix asan reported bugs (GitHub PR)

Closes IDFGH-9860

See merge request espressif/esp-idf!23172
2023-04-20 22:37:42 +08:00
Ivan Grokhotkov
f64ac33554
nvs: fix string/blob comparison lengths in host tests 2023-04-18 08:02:38 +02:00
Cody P Schafer
cbe906e53c
nvs_host_test: replace sprintf with snprintf
With some libc impls (ie: Xcode 13.1), sprintf is marked as deprecated
and causes the build with `-Werror` to fail. Switch the `sprintf` usage
in test_nvs.cpp to use `snprintf` to allow builds to complete without
warning.
2023-04-03 16:33:57 -04:00
Cody P Schafer
630343e4b9
test_nvs_host: fix asan reported bugs
- Use of `sizeof(uint32_t *)` instead of `sizeof(uint32_t)` in
   arguments
 - Use of `memcmp` without checking that length agreed (add `memeq`)
2023-04-03 16:30:02 -04:00
Jakob Hasse
bed81f450d ci(nvs_flash): Increase timeout of nvs_page_test
* 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
2023-02-13 12:35:52 +08:00
Martin Vychodil
a2b0068478 Merge branch 'bugfix/linux_build_errors' into 'master'
fix(linux): fix build errors without --skip-setting-flags

See merge request espressif/esp-idf!22063
2023-01-20 14:46:36 +08:00
Ivan Grokhotkov
cef0744299 Merge branch 'bugfix/linux_target_gen_partition_table' into 'master'
multiple fixes for linux target

Closes IDF-6641

See merge request espressif/esp-idf!21993
2023-01-18 11:57:08 +08:00
Jakob Hasse
9991862a10 fix(linux): fix build errors and warnings, remove ignore file 2023-01-18 09:24:28 +08:00
Fu Hanxi
b02687a6c4 test: migrate linux target host test jobs into pytest-embedded 2023-01-16 10:25:55 +08:00
Ivan Grokhotkov
e7540dbe0e
docs: remove the outdated "IDF monitor doesn't work on linux" notes 2023-01-13 08:14:56 +01:00
Ivan Grokhotkov
ec8f38c9da
build system: generate the partition table by default for linux target
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.
2023-01-13 08:14:56 +01:00
Marius Vikhammer
7f0aa7b534 docs: updated path to nvs_tool.py in chinese doc. 2023-01-06 11:00:17 +08:00
Ivan Grokhotkov
61c5fc21e1
docs: fix nvs-related docs build issue 2023-01-05 09:28:57 +01:00
Adam Múdry
40d1eff2bd Merge branch 'feature/nvs_tool_refinement' into 'master'
nvs: Partition tool refinement

Closes IDF-6061

See merge request espressif/esp-idf!20683
2023-01-05 06:39:01 +08:00
mofeifei
0fc2fbe83f docs: update cn trans nvs_partition_tool/readme 2023-01-04 18:32:30 +01:00
Adam Múdry
87bdcc89d0 nvs: NVS tool refinement
add: JSON output
add: integrity check - correct number of free pages check
change: split to separate files
2023-01-04 12:44:22 +01:00
Jakob Hasse
e6ca481623 bugfix(nvs_flash): fixed potential memory leak in nvs::Storage::init() 2022-12-15 15:37:21 +08:00