You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2021/04/15 13:58:52 UTC

[tvm] branch main updated: Fix Zephyr flashing on physical hardware, busted in #7813 (#7853)

This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 1ebfafd  Fix Zephyr flashing on physical hardware, busted in #7813 (#7853)
1ebfafd is described below

commit 1ebfafd1c5812e97bfe8c5d6c4a2c8cac5dc6463
Author: Andrew Reusch <ar...@octoml.ai>
AuthorDate: Thu Apr 15 06:58:32 2021 -0700

    Fix Zephyr flashing on physical hardware, busted in #7813 (#7853)
---
 python/tvm/micro/contrib/zephyr.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/python/tvm/micro/contrib/zephyr.py b/python/tvm/micro/contrib/zephyr.py
index ccaae6a..b7d7496 100644
--- a/python/tvm/micro/contrib/zephyr.py
+++ b/python/tvm/micro/contrib/zephyr.py
@@ -465,9 +465,10 @@ class ZephyrFlasher(tvm.micro.compiler.Flasher):
         if self._qemu:
             return self._zephyr_transport(micro_binary)
 
-        build_dir = os.path.dirname(
-            micro_binary.abspath(micro_binary.labelled_files["cmake_cache"][0])
-        )
+        cmake_cache_path = micro_binary.abspath(micro_binary.labelled_files["cmake_cache"][0])
+        cmake_entries = read_cmake_cache(cmake_cache_path)
+
+        build_dir = os.path.dirname(cmake_cache_path)
 
         # The nRF5340DK requires an additional `nrfjprog --recover` before each flash cycle.
         # This is because readback protection is enabled by default when this device is flashed.