gromero commented on a change in pull request #9584:
URL: https://github.com/apache/tvm/pull/9584#discussion_r758899121
##########
File path: apps/microtvm/zephyr/template_project/microtvm_api_server.py
##########
@@ -314,6 +319,13 @@ def _get_nrf_device_args(options):
]
+def get_zephyr_base(options: dict):
+ """Returns Zephyr base path"""
+ zephyr_base = options.get("zephyr_base", ZEPHYR_BASE)
+ assert zephyr_base, "'zephyr_base' not passed and not found by default!"
Review comment:
Maybe s/not passed/option not passed/ here to match what's in the
Arduino's code?
##########
File path: apps/microtvm/arduino/template_project/microtvm_api_server.py
##########
@@ -388,6 +397,11 @@ def build(self, options):
BOARD_LIST_HEADERS = ("Port", "Type", "Board Name", "FQBN", "Core")
+ def _get_arduino_cli_cmd(self, options: dict):
+ arduino_cli_cmd = options.get("arduino_cli_cmd", ARDUINO_CLI_CMD)
+ assert arduino_cli_cmd, "'arduino_cli_cmd' command not passed and not
found by default!"
Review comment:
Maybe s/command not passed/option not passed/?
##########
File path: apps/microtvm/arduino/template_project/microtvm_api_server.py
##########
@@ -71,14 +73,19 @@ class BoardAutodetectFailed(Exception):
PROJECT_OPTIONS = [
server.ProjectOption(
"arduino_board",
- required=["generate_project", "build", "flash", "open_transport"],
+ required=["build", "flash", "open_transport"],
choices=list(BOARD_PROPERTIES),
type="str",
help="Name of the Arduino board to build for.",
),
server.ProjectOption(
"arduino_cli_cmd",
- optional=["build", "flash", "open_transport"],
+ required=["generate_project", "build", "flash", "open_transport"]
+ if not ARDUINO_CLI_CMD
+ else None,
+ optional=["generate_project", "build", "flash", "open_transport"]
+ if ARDUINO_CLI_CMD
+ else None,
default="arduino-cli",
Review comment:
It should be probed too, so `default=ARDUINO_CLI_CMD`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]