Skip to content

Commit

Permalink
[microTVM][Zephyr] Add MIMXRT1050 board support (apache#9068)
Browse files Browse the repository at this point in the history
* add target support

* fix ci issue
  • Loading branch information
mehrdadh authored and ylc committed Sep 29, 2021
1 parent 45297c2 commit 026f8ab
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
6 changes: 6 additions & 0 deletions apps/microtvm/zephyr/template_project/boards.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"mimxrt1050_evk": {
"board": "mimxrt1050_evk",
"model": "imxrt10xx",
"is_qemu": false,
"fpu": true
},
"mps2_an521": {
"board": "mps2_an521",
"model": "mps2_an521",
Expand Down
12 changes: 9 additions & 3 deletions apps/microtvm/zephyr/template_project/microtvm_api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def _get_device_args(options):
"nucleo_l4r5zi": {"idVendor": 0x0483, "idProduct": 0x374B},
"nucleo_f746zg": {"idVendor": 0x0483, "idProduct": 0x374B},
"stm32f746g_disco": {"idVendor": 0x0483, "idProduct": 0x374B},
"mimxrt1050_evk": {"idVendor": 0x1366, "idProduct": 0x0105},
}


Expand Down Expand Up @@ -545,6 +546,10 @@ def _find_openocd_serial_port(cls, options):

return ports[0].device

@classmethod
def _find_jlink_serial_port(cls, options):
return cls._find_openocd_serial_port(options)

@classmethod
def _find_serial_port(cls, options):
flash_runner = _get_flash_runner()
Expand All @@ -555,9 +560,10 @@ def _find_serial_port(cls, options):
if flash_runner == "openocd":
return cls._find_openocd_serial_port(options)

raise FlashRunnerNotSupported(
f"Don't know how to deduce serial port for flash runner {flash_runner}"
)
if flash_runner == "jlink":
return cls._find_jlink_serial_port(options)

raise RuntimeError(f"Don't know how to deduce serial port for flash runner {flash_runner}")

def __init__(self, options):
self._options = options
Expand Down
2 changes: 1 addition & 1 deletion python/tvm/target/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def intel_graphics(model="unknown", options=None):
"atsamd51": ["-mcpu=cortex-m4"],
"cxd5602gg": ["-mcpu=cortex-m4"],
"esp32": [],
"imxrt1060": ["-mcpu=cortex-m7"],
"imxrt10xx": ["-mcpu=cortex-m7"],
"mps2_an521": ["-mcpu=cortex-m33"],
"nrf52840": ["-mcpu=cortex-m4"],
"nrf5340dk": ["-mcpu=cortex-m33"],
Expand Down

0 comments on commit 026f8ab

Please sign in to comment.