This is an automated email from the ASF dual-hosted git repository.
leandron 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 b5c4aa3 [microTVM] Zephyr: implement 'west_cmd' server option (#8941)
b5c4aa3 is described below
commit b5c4aa305fd1f0b69425be8cefe4e43f52b5bd07
Author: Gustavo Romero <[email protected]>
AuthorDate: Fri Sep 10 06:05:20 2021 -0300
[microTVM] Zephyr: implement 'west_cmd' server option (#8941)
Currently Zephyr Project API server lists option 'west_cmd' as an
option available in Zephyr platform by advertising it in PROJECT_OPTIONS
but that option is not used by any API method.
That commit adds that option to the server as a non-required option to
the build() interface method, allowing the user to specify an
alternative path to the west tool. If that option is not specified the
Zephyr build system takes care of searching for west as a module (so
relying on West being available on Python, i.e. relying on
'python3 -m west').
Signed-off-by: Gustavo Romero <[email protected]>
---
apps/microtvm/zephyr/template_project/microtvm_api_server.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/apps/microtvm/zephyr/template_project/microtvm_api_server.py
b/apps/microtvm/zephyr/template_project/microtvm_api_server.py
index 08ba1a1..8a393c5 100644
--- a/apps/microtvm/zephyr/template_project/microtvm_api_server.py
+++ b/apps/microtvm/zephyr/template_project/microtvm_api_server.py
@@ -447,6 +447,9 @@ class Handler(server.ProjectAPIHandler):
if options.get("zephyr_base"):
cmake_args.append(f"-DZEPHYR_BASE:STRING={options['zephyr_base']}")
+ if options.get("west_cmd"):
+ cmake_args.append(f"-DWEST={options['west_cmd']}")
+
cmake_args.append(f"-DBOARD:STRING={options['zephyr_board']}")
check_call(cmake_args, cwd=BUILD_DIR)