Skip to content

Commit 7a54490

Browse files
authored
[ESP32] Use the nvs generator from pypi instead from IDF_PATH (project-chip#35553)
1 parent 85d1158 commit 7a54490

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

scripts/setup/requirements.esp32.txt

+1
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ python-socketio<5
1414
itsdangerous<2.1 ; python_version < "3.11"
1515
esp_idf_monitor==1.1.1
1616
esp-idf-kconfig==1.2.0
17+
esp_idf_nvs_partition_gen==0.1.2

scripts/tools/generate_esp32_chip_factory_bin.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from types import SimpleNamespace
2626

2727
import cryptography.x509
28+
import esp_idf_nvs_partition_gen.nvs_partition_gen as nvs_partition_gen
2829
from esp_secure_cert.tlv_format import generate_partition_ds, generate_partition_no_ds, tlv_priv_key_t, tlv_priv_key_type_t
2930

3031
CHIP_TOPDIR = os.path.dirname(os.path.realpath(__file__))[:-len(os.path.join('scripts', 'tools'))]
@@ -33,15 +34,6 @@
3334
sys.path.insert(0, os.path.join(CHIP_TOPDIR, 'src', 'setup_payload', 'python'))
3435
from SetupPayload import CommissioningFlow, SetupPayload # noqa: E402 isort:skip
3536

36-
if os.getenv('IDF_PATH'):
37-
sys.path.insert(0, os.path.join(os.getenv('IDF_PATH'),
38-
'components',
39-
'nvs_flash',
40-
'nvs_partition_generator'))
41-
import nvs_partition_gen
42-
else:
43-
sys.stderr.write("Please set the IDF_PATH environment variable.")
44-
exit(0)
4537

4638
INVALID_PASSCODES = [00000000, 11111111, 22222222, 33333333, 44444444, 55555555,
4739
66666666, 77777777, 88888888, 99999999, 12345678, 87654321]

0 commit comments

Comments
 (0)