fix(esptool_py): Fix NVS partition being incorrectly marked as encrypted

- The CMake function esptool_py_partition_needs_encryption() in the esptool_py
component used to mark NVS partition as encrypted, instead it should have marked
the NVS keys partition as encrypted.
This commit is contained in:
harshal.patil 2025-01-07 16:58:30 +05:30
parent 48e11e68a1
commit 98285d819b
No known key found for this signature in database
GPG Key ID: 67334E837530B75C

View File

@ -251,13 +251,13 @@ function(esptool_py_partition_needs_encryption retencrypted partition_name)
# - DATA 0x01
# Subtypes:
# - ota 0x00
# - nvs 0x02
# If the partition is an app, an OTA or an NVS partition, then it should
# - nvs_keys 0x04
# If the partition is an app, an OTA or an NVS keys partition, then it should
# be encrypted
if(
(${type} EQUAL 0) OR
(${type} EQUAL 1 AND ${subtype} EQUAL 0) OR
(${type} EQUAL 1 AND ${subtype} EQUAL 2)
(${type} EQUAL 1 AND ${subtype} EQUAL 4)
)
set(encrypted TRUE)
endif()