mehrdadh commented on code in PR #13723:
URL: https://github.com/apache/tvm/pull/13723#discussion_r1065032575
##########
apps/microtvm/zephyr/template_project/microtvm_api_server.py:
##########
@@ -714,23 +716,27 @@ def flash(self, options):
if _find_platform_from_cmake_file(API_SERVER_DIR / CMAKELIST_FILENAME):
return # NOTE: qemu requires no flash step--it is launched from
open_transport.
+ flash_runner = _get_flash_runner()
# The nRF5340DK requires an additional `nrfjprog --recover` before
each flash cycle.
# This is because readback protection is enabled by default when this
device is flashed.
# Otherwise, flashing may fail with an error such as the following:
# ERROR: The operation attempted is unavailable due to readback
protection in
# ERROR: your device. Please use --recover to unlock the device.
zephyr_board = _find_board_from_cmake_file(API_SERVER_DIR /
CMAKELIST_FILENAME)
- if zephyr_board.startswith("nrf5340dk") and _get_flash_runner() ==
"nrfjprog":
+ if zephyr_board.startswith("nrf5340dk") and flash_runner == "nrfjprog":
recover_args = ["nrfjprog", "--recover"]
recover_args.extend(_get_nrf_device_args(serial_number))
check_call(recover_args, cwd=API_SERVER_DIR / "build")
flash_extra_args = []
- if _get_flash_runner() == "openocd" and serial_number:
- flash_extra_args = ["--cmd-pre-init", f"""hla_serial
{serial_number}"""]
+ if flash_runner == "openocd" and serial_number:
+ flash_extra_args += ["--cmd-pre-init", f"""hla_serial
{serial_number}"""]
Review Comment:
I remember testing this without "" around the `hla_serial` option and it was
not working
--
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]