From 1bb1b70e0f06e53d844621ec2c3e7ea23db46062 Mon Sep 17 00:00:00 2001 From: Shubham Kulkarni Date: Thu, 14 Jul 2022 18:09:50 +0530 Subject: [PATCH] docs: Add documentation for define extra partition subtypes through build system --- docs/en/api-guides/build-system.rst | 1 + docs/en/api-guides/partition-tables.rst | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/en/api-guides/build-system.rst b/docs/en/api-guides/build-system.rst index 566ca83ed7..1a83795142 100644 --- a/docs/en/api-guides/build-system.rst +++ b/docs/en/api-guides/build-system.rst @@ -343,6 +343,7 @@ from the component CMakeLists.txt: - ``IDF_VERSION_MAJOR``, ``IDF_VERSION_MINOR``, ``IDF_VERSION_PATCH``: Components of ESP-IDF version, to be used in conditional expressions. Note that this information is less precise than that provided by ``IDF_VER`` variable. ``v4.0-dev-*``, ``v4.0-beta1``, ``v4.0-rc1`` and ``v4.0`` will all have the same values of ``IDF_VERSION_*`` variables, but different ``IDF_VER`` values. - ``IDF_TARGET``: Name of the target for which the project is being built. - ``PROJECT_VER``: Project version. +- ``EXTRA_PARTITION_SUBTYPES``: CMake list of extra partition subtypes. Each subtype description is a comma separated string with ``type_name, subtype_name, numeric_value`` format. Components may add new subtypes by appending them to this list. * If :ref:`CONFIG_APP_PROJECT_VER_FROM_CONFIG` option is set, the value of :ref:`CONFIG_APP_PROJECT_VER` will be used. * Else, if ``PROJECT_VER`` variable is set in project CMakeLists.txt file, its value will be used. diff --git a/docs/en/api-guides/partition-tables.rst b/docs/en/api-guides/partition-tables.rst index cad9f9cd63..c168f498be 100644 --- a/docs/en/api-guides/partition-tables.rst +++ b/docs/en/api-guides/partition-tables.rst @@ -131,6 +131,11 @@ See enum :cpp:type:`esp_partition_subtype_t` for the full list of subtypes defin Note that when writing in C++, an application-defined subtype value requires casting to type :cpp:type:`esp_partition_subtype_t` in order to use it with the :ref:`partition API`. +Extra Partition SubTypes +~~~~~~~~~~~~~~~~~~~~~~~~ + +A component can define a new partition subtype by setting the ``EXTRA_PARTITION_SUBTYPES`` property. This property is a CMake list, each entry of which is a comma separated string with ``, , `` format. The build system uses this property to add extra subtypes and creates fields named ``ESP_PARTITION_SUBTYPE__`` in :cpp:type:`esp_partition_type_t`. The project can use this subtype to define partitions in the partitions table CSV file and use the new fields in :cpp:type:`esp_partition_type_t`. + Offset & Size ~~~~~~~~~~~~~