mirror of
https://github.com/MikronMIK32/mik32-uploader.git
synced 2026-01-01 13:37:03 +03:00
remove hardcoded vars
This commit is contained in:
parent
d6dd2f51aa
commit
bdd11be122
@ -221,8 +221,6 @@ def upload_file(
|
|||||||
pages: Pages = form_pages(segments, boot_mode)
|
pages: Pages = form_pages(segments, boot_mode)
|
||||||
|
|
||||||
proc: Union[subprocess.Popen, None] = None
|
proc: Union[subprocess.Popen, None] = None
|
||||||
is_run_openocd = False
|
|
||||||
log_path = "default"
|
|
||||||
if is_run_openocd:
|
if is_run_openocd:
|
||||||
try:
|
try:
|
||||||
logging.debug("OpenOCD try start!")
|
logging.debug("OpenOCD try start!")
|
||||||
@ -265,7 +263,7 @@ def upload_file(
|
|||||||
gpio_init(openocd, mik_version)
|
gpio_init(openocd, mik_version)
|
||||||
start_time = time.perf_counter()
|
start_time = time.perf_counter()
|
||||||
|
|
||||||
result |= mik32_spifi.write_pages_by_sectors(
|
result |= mik32_spifi.write_pages(
|
||||||
pages.pages_spifi, openocd, use_quad_spi=use_quad_spi)
|
pages.pages_spifi, openocd, use_quad_spi=use_quad_spi)
|
||||||
|
|
||||||
write_time = time.perf_counter() - start_time
|
write_time = time.perf_counter() - start_time
|
||||||
@ -283,7 +281,6 @@ def upload_file(
|
|||||||
mik32_ram.write_segments(segments_ram, openocd)
|
mik32_ram.write_segments(segments_ram, openocd)
|
||||||
result |= 0
|
result |= 0
|
||||||
|
|
||||||
post_action = ""
|
|
||||||
openocd.run(post_action)
|
openocd.run(post_action)
|
||||||
except ConnectionRefusedError:
|
except ConnectionRefusedError:
|
||||||
print("ERROR: The connection to OpenOCD is not established. Check the settings and connection of the debugger")
|
print("ERROR: The connection to OpenOCD is not established. Check the settings and connection of the debugger")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user