From 20740ce0dae693aa5033ed783bf3c9bc2935b337 Mon Sep 17 00:00:00 2001 From: KonstantinKondrashov Date: Fri, 31 Mar 2023 21:19:50 +0800 Subject: [PATCH] ttfw_idf: Extend bootloader_flash API --- tools/ci/python_packages/ttfw_idf/IDFDUT.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/ci/python_packages/ttfw_idf/IDFDUT.py b/tools/ci/python_packages/ttfw_idf/IDFDUT.py index 5828eaabdb..ed5268985b 100644 --- a/tools/ci/python_packages/ttfw_idf/IDFDUT.py +++ b/tools/ci/python_packages/ttfw_idf/IDFDUT.py @@ -391,13 +391,14 @@ class IDFDUT(DUT.SerialDUT): for (_, f) in encrypt_offs_files: f.close() - def bootloader_flash(self): + def bootloader_flash(self, binary_path=None): """ download bootloader. :return: None """ - bootloader_path = os.path.join(self.app.binary_path, 'bootloader', 'bootloader.bin') + binary_path = self.app.binary_path if binary_path is None else binary_path + bootloader_path = os.path.join(binary_path, 'bootloader', 'bootloader.bin') offs = int(self.app.get_sdkconfig()['CONFIG_BOOTLOADER_OFFSET_IN_FLASH'], 0) flash_files = [(offs, bootloader_path)] self.write_flash(flash_files)