tiny-test-fw: support testing apps with flash encryption
If CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT is set, pass --encrypted flag to esptool.py.
This commit is contained in:
parent
fae124a2c1
commit
a37694741c
2 changed files with 6 additions and 1 deletions
|
@ -135,6 +135,11 @@ class IDFApp(App.BaseApp):
|
||||||
# offs, filename
|
# offs, filename
|
||||||
flash_files.append((args[idx], args[idx + 1]))
|
flash_files.append((args[idx], args[idx + 1]))
|
||||||
|
|
||||||
|
# The build metadata file does not currently have details, which files should be encrypted and which not.
|
||||||
|
# Assume that all files should be encrypted if flash encryption is enabled in development mode.
|
||||||
|
sdkconfig_dict = self.get_sdkconfig()
|
||||||
|
flash_settings["encrypt"] = "CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT" in sdkconfig_dict
|
||||||
|
|
||||||
# make file offsets into integers, make paths absolute
|
# make file offsets into integers, make paths absolute
|
||||||
flash_files = [(int(offs, 0), os.path.join(self.binary_path, path.strip())) for (offs, path) in flash_files]
|
flash_files = [(int(offs, 0), os.path.join(self.binary_path, path.strip())) for (offs, path) in flash_files]
|
||||||
|
|
||||||
|
|
|
@ -217,7 +217,7 @@ class IDFDUT(DUT.SerialDUT):
|
||||||
'no_stub': False,
|
'no_stub': False,
|
||||||
'compress': True,
|
'compress': True,
|
||||||
'verify': False,
|
'verify': False,
|
||||||
'encrypt': False,
|
'encrypt': self.app.flash_settings.get("encrypt", False),
|
||||||
'erase_all': False,
|
'erase_all': False,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue