Некоторые правки

This commit is contained in:
Sergey Shchelkanov 2024-09-11 11:35:55 +03:00
parent c868bd1028
commit fb64694722
2 changed files with 5 additions and 6 deletions

View File

@ -29,7 +29,7 @@ def upload_file(
adapter_speed=adapter_default_speed,
is_open_console=False,
boot_mode=BootMode.UNDEFINED,
log_path=DEFAULT_WORKPATH,
log_path=default_log_path,
post_action=default_post_action,
mik_version=MIK32_Version.MIK32V2
) -> int:

View File

@ -28,21 +28,20 @@ program_name = f'mik32-uploader-{applicaton_version}'
# BOLD = '\033[1m'
# UNDERLINE = '\033[4m'
openocd_exec = "openocd"
if os.name == 'nt':
openocd_exec = "openocd.exe"
else:
openocd_exec = "openocd"
default_openocd_host = '127.0.0.1'
openocd_exec_path = os.path.join("openocd", "bin", openocd_exec)
openocd_scripts_path = os.path.join("openocd-scripts")
openocd_interface_path = os.path.join("interface", "ftdi", "mikron-link.cfg")
openocd_target_path = os.path.join("target", "mik32.cfg")
default_post_action = "reset run"
default_log_path = "/dev/null"
if os.name == 'nt':
default_log_path = "nul"
else:
default_log_path = "/dev/null"
default_post_action = "reset run"
adapter_default_speed = 500