You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/08/09 16:24:58 UTC

[GitHub] [tvm] mehrdadh commented on a diff in pull request #12338: [microTVM][Zephyr] Fix bug: missing BOARD in CMakeCache file

mehrdadh commented on code in PR #12338:
URL: https://github.com/apache/tvm/pull/12338#discussion_r941551892


##########
apps/microtvm/zephyr/template_project/microtvm_api_server.py:
##########
@@ -152,6 +152,20 @@ def _get_flash_runner():
     return doc["flash-runner"]
 
 
+def _find_board_from_cmake_file(cmake_file: Union[str, pathlib.Path]) -> str:
+    """Find Zephyr board from generated CMakeLists.txt"""
+    zephyr_board = None
+    with open(cmake_file) as cmake_f:
+        for line in cmake_f:
+            if line.startswith("set(BOARD"):
+                zephyr_board = line.strip("\n").strip("\r").strip(")").split(" ")[1]

Review Comment:
   thanks for the suggestion, I will fix this in a follow up PR



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org