From 304469890bb76360e8627f4a13458eb5739875a3 Mon Sep 17 00:00:00 2001 From: sh-sergey Date: Fri, 27 Dec 2024 18:09:50 +0300 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=B1=D1=80=D0=B0=D0=BD=20=D0=BB=D0=B8?= =?UTF-8?q?=D1=88=D0=BD=D0=B8=D0=B9=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + mik32_debug_hal/spifi.py | 1 - mik32_upload.py | 5 +++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 750214f..154e3b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ __pycache__ .vscode openocd +venv *.code-workspace dist mik32_upload.spec diff --git a/mik32_debug_hal/spifi.py b/mik32_debug_hal/spifi.py index d8f98a7..7dc0980 100644 --- a/mik32_debug_hal/spifi.py +++ b/mik32_debug_hal/spifi.py @@ -45,7 +45,6 @@ def init_periphery(openocd: OpenOcdTclRpc): def init(openocd: OpenOcdTclRpc): - print("MCU clock init", flush=True) init_periphery(openocd) diff --git a/mik32_upload.py b/mik32_upload.py index b02a2fb..57d40bc 100644 --- a/mik32_upload.py +++ b/mik32_upload.py @@ -240,6 +240,8 @@ def upload_file( time.sleep(0.1) with OpenOcdTclRpc(host, port) as openocd: try: + openocd.run(f"log_output \"{log_path}\"") + openocd.run(f"debug_level 1") openocd.run("capture \"riscv.cpu curstate\"") except OSError as e: print("ERROR: Tcl port connection failed") @@ -248,8 +250,7 @@ def upload_file( if (all(openocd_interface.find(i) == -1 for i in adapter_speed_not_supported)): openocd.run(f"adapter speed {adapter_speed}") - openocd.run(f"log_output \"{log_path}\"") - openocd.run(f"debug_level 1") + logging.debug("OpenOCD configured!")