We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a60cd0f commit 0413ce3Copy full SHA for 0413ce3
apps/microtvm/arduino/template_project/microtvm_api_server.py
@@ -586,10 +586,11 @@ def _get_arduino_port(
586
def _get_board_from_makefile(self, makefile_path: pathlib.Path) -> str:
587
"""Get Board from generated Makefile."""
588
with open(makefile_path) as makefile_f:
589
- line = makefile_f.readline()
590
- if "BOARD" in line:
591
- board = re.sub(r"\s", "", line).split(":=")[1]
592
- return board
+ lines = makefile_f.readlines()
+ for line in lines:
+ if "BOARD" in line:
+ board = re.sub(r"\s", "", line).split(":=")[1]
593
+ return board
594
raise RuntimeError("Board was not found in Makefile: {}".format(makefile_path))
595
596
FLASH_TIMEOUT_SEC = 60
0 commit comments