-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[microTVM][Zephyr] Add MIMXRT1050 board support #9068
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,10 @@ | |
"board": "qemu_cortex_r5", | ||
"model": "zynq_mp_r5", | ||
}, | ||
"mimxrt1050_evk": { | ||
"board": "mimxrt1050_evk", | ||
"model": "imxrt10xx", | ||
}, | ||
} | ||
|
||
|
||
|
@@ -180,6 +184,9 @@ def _get_device_args(options): | |
if flash_runner == "openocd": | ||
return _get_openocd_device_args(options) | ||
|
||
if flash_runner == "jlink": | ||
return [] | ||
|
||
raise BoardError( | ||
f"Don't know how to find serial terminal for board {CMAKE_CACHE['BOARD']} with flash " | ||
f"runner {flash_runner}" | ||
|
@@ -191,6 +198,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}, | ||
} | ||
|
||
|
||
|
@@ -586,6 +594,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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mehrdadh I think that ideally
The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for extra investigation on this. I agree that this is a bit confusing. We could do a refactor here in a follow on PR. |
||
|
||
@classmethod | ||
def _find_serial_port(cls, options): | ||
flash_runner = _get_flash_runner() | ||
|
@@ -596,9 +608,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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there no arg to specify serial?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it works without specifying the --serial assuming there's only once device. We should have the serial though, I'll add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized that _get_device_args is only used with NRF board. So we don't need to have Jlink support in this function.