guberti commented on a change in pull request #8493:
URL: https://github.com/apache/tvm/pull/8493#discussion_r676989172



##########
File path: apps/microtvm/arduino/template_project/microtvm_api_server.py
##########
@@ -0,0 +1,378 @@
+import collections
+import functools
+import json
+import logging
+import os
+import os.path
+import pathlib
+import re
+import shlex
+import shutil
+import subprocess
+import sys
+import tarfile
+from string import Template
+import tempfile
+import time
+
+import serial
+import serial.tools.list_ports
+
+from tvm.micro.project_api import server
+
+MODEL_LIBRARY_FORMAT_RELPATH = "src/model/model.tar"
+
+API_SERVER_DIR = pathlib.Path(os.path.dirname(__file__) or os.path.getcwd())
+BUILD_DIR = API_SERVER_DIR / "build"
+IS_TEMPLATE = not (API_SERVER_DIR / MODEL_LIBRARY_FORMAT_RELPATH).exists()
+MODEL_LIBRARY_FORMAT_PATH = "" if IS_TEMPLATE else API_SERVER_DIR / 
MODEL_LIBRARY_FORMAT_RELPATH
+
+
+class InvalidPortException(Exception):
+    """Raised when the given port could not be opened"""
+
+
+class SketchUploadException(Exception):
+    """Raised when a sketch cannot be uploaded for an unknown reason."""
+
+
+class BoardAutodetectFailed(Exception):
+    """Raised when no attached hardware is found matching the requested 
board"""
+
+
+PROJECT_OPTIONS = [
+    server.ProjectOption("verbose", help="Run build with verbose output"),
+    server.ProjectOption("arduino_cmd", help="Path to the arduino-cli tool."),

Review comment:
       Renamed to `arduino_cli_cmd` to keep it consistent with the Zephyr 
`microtvm_api_server` (which uses the flag `west_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]


Reply via email to