feat(nvs_flash): Implemented basic nvs_flash support for bootloader

This commit is contained in:
radek.tandler
2024-06-26 11:50:14 +02:00
parent c2ae806661
commit 4e8bb8a082
41 changed files with 1980 additions and 70 deletions

View File

@@ -27,6 +27,7 @@
fatfsgen
mass_mfg.rst
nvs_flash
nvs_bootloader
nvs_encryption
nvs_partition_gen.rst
nvs_partition_parse.rst
@@ -52,6 +53,8 @@
- 演示了如何在 NVS flash 中使用 C 语言 API 读写整数数据类型。
* - :example:`nvs_rw_value <storage/nvs_rw_value>`
- 演示了如何在 NVS flash 中使用 C++ 语言 API 读写整数数据类型。
* - :example:`nvs_bootloader <storage/nvs_bootloader>`
- 演示了如何使用引导加载程序代码中可用的 API 来读取 NVS 数据。
* - :example:`nvsgen <storage/nvsgen>`
- 演示了如何使用基于 Python 的 NVS 镜像生成工具,根据 CSV 文件内容创建 NVS 分区镜像。

View File

@@ -0,0 +1,4 @@
NVS Bootloader
==============
:link_to_translation:`en:[English]`

View File

@@ -37,6 +37,13 @@ NVS 支持至多存储数万个键,且 NVS 分区的大小也可以达到几
启用 SPIRAM 且将 :ref:`CONFIG_SPIRAM_USE` 设为 ``CONFIG_SPIRAM_USE_CAPS_ALLOC`` 后,即可在 menuconfig 菜单的 nvs_flash 组件中启用 :ref:`CONFIG_NVS_ALLOCATE_CACHE_IN_SPIRAM` 选项。
.. note:: 使用带有 SPI 连接的 PSRAM 会导致 NVS API 的整数操作速度减慢约 2.5 倍。
.. _nvs_bootloader:
在引导加载程序代码中使用 NVS
---------------------------------
运行中的应用程序可使用本指南中描述的标准 NVS API。也可以在自定义引导加载程序代码中从 NVS 读取数据。更多信息请参阅 :doc:`nvs_bootloader` 指南。
键值对
^^^^^^^^^^^^^^^