partition table: Update documentation about "test" partition type

Reported from forum: https://esp32.com/viewtopic.php?f=13&t=10777&p=44164#p44164
This commit is contained in:
Angus Gratton 2019-06-05 12:58:27 +10:00 committed by Angus Gratton
parent 9f72091043
commit 79b7ed2d7d
2 changed files with 5 additions and 3 deletions

View file

@ -42,13 +42,15 @@ Partition table.::
ota_0, 0, ota_0, , 512K
ota_1, 0, ota_1, , 512K
.. _bootloader_boot_from_test_firmware:
Boot from TEST firmware
------------------------
The user can write a special firmware for testing in production, and run it as needed. The partition table also needs a dedicated partition for this testing firmware (See `partition table`).
To trigger a test app you need to set :envvar:`CONFIG_BOOTLOADER_APP_TEST`.
:envvar:`CONFIG_BOOTLOADER_NUM_PIN_APP_TEST` - number of the GPIO input to boot TEST partition. The selected GPIO will be configured as an input with internal pull-up enabled. To trigger a test app, this GPIO must be pulled low on reset.
After the GPIO input is deactivated and the device reboots, the old application will boot (factory or any OTA slot).
:envvar:`CONFIG_BOOTLOADER_NUM_PIN_APP_TEST` - GPIO number to boot TEST partition. The selected GPIO will be configured as an input with internal pull-up enabled. To trigger a test app, this GPIO must be pulled low on reset.
After the GPIO input is deactivated and the device reboots, the normally configured application will boot (factory or any OTA slot).
:envvar:`CONFIG_BOOTLOADER_HOLD_TIME_GPIO` - this is hold time of GPIO for reset/test mode (by default 5 seconds). The GPIO must be held low continuously for this period of time after reset before a factory reset or test partition boot (as applicable) is performed.

View file

@ -97,7 +97,7 @@ When type is "app", the subtype field can be specified as factory (0), ota_0 (0x
- OTA never updates the factory partition.
- If you want to conserve flash usage in an OTA project, you can remove the factory partition and use ota_0 instead.
- ota_0 (0x10) ... ota_15 (0x1F) are the OTA app slots. Refer to the :doc:`OTA documentation <../api-reference/system/ota>` for more details, which then use the OTA data partition to configure which app slot the bootloader should boot. If using OTA, an application should have at least two OTA application slots (ota_0 & ota_1). Refer to the :doc:`OTA documentation <../api-reference/system/ota>` for more details.
- test (0x2) is a reserved subtype for factory test procedures. It is not currently supported by the esp-idf bootloader.
- test (0x2) is a reserved subtype for factory test procedures. It will be used as the fallback boot partition if no other valid app partition is found. It is also possible to configure the bootloader to read a GPIO input during each boot, and boot this partition if the GPIO is held low, see :ref:`bootloader_boot_from_test_firmware`.
Data Subtypes
~~~~~~~~~~~~~