mirror of
https://github.com/MikronMIK32/mik32-uploader.git
synced 2026-01-01 13:37:03 +03:00
Исправлена настройка скорости jtag адаптера
This commit is contained in:
parent
d4e5804410
commit
cbe78d08d7
@ -178,12 +178,6 @@ def form_pages(segments: List[Segment], boot_mode=BootMode.UNDEFINED) -> Pages:
|
|||||||
return Pages(pages_eeprom, pages_spifi)
|
return Pages(pages_eeprom, pages_spifi)
|
||||||
|
|
||||||
|
|
||||||
adapter_speed_not_supported = [
|
|
||||||
"altera-usb-blaster",
|
|
||||||
"start-link",
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
def upload_file(
|
def upload_file(
|
||||||
filename: str,
|
filename: str,
|
||||||
host: str = '127.0.0.1',
|
host: str = '127.0.0.1',
|
||||||
@ -254,9 +248,12 @@ def upload_file(
|
|||||||
print("Check connectivity and OpenOCD log")
|
print("Check connectivity and OpenOCD log")
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
if (all(openocd_interface.find(i) == -1 for i in adapter_speed_not_supported)):
|
if openocd.run(f"adapter name") != "usb_blaster":
|
||||||
|
try:
|
||||||
openocd.run(f"adapter speed {adapter_speed}")
|
openocd.run(f"adapter speed {adapter_speed}")
|
||||||
|
except TclException as e:
|
||||||
|
if e.code == -4:
|
||||||
|
print("This adapter doesn't support configurable speed")
|
||||||
|
|
||||||
logging.debug("OpenOCD configured!")
|
logging.debug("OpenOCD configured!")
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user