mirror of
https://github.com/MikronMIK32/mik32-uploader.git
synced 2026-10-29 18:11:13 +03:00
debug output wip
This commit is contained in:
1 parent
23666d49fa
commit
46c72768e0
2 files changed
+6
-1
No files matched your search
+2
-1
@@ -319,7 +319,8 @@ def spifi_read_data(openocd: OpenOcdTclRpc, address: int, byte_count: int, bin_d
|
|||||||
for i in range(byte_count):
|
for i in range(byte_count):
|
||||||
data8 = openocd.read_memory(SPIFI_CONFIG_DATA32, 8, 1)[0]
|
data8 = openocd.read_memory(SPIFI_CONFIG_DATA32, 8, 1)[0]
|
||||||
read_data.append(data8)
|
read_data.append(data8)
|
||||||
# print(f"DATA[{i+address}] = {read_data[i]:#0x}")
|
if is_verbose:
|
||||||
|
print(f"DATA[{i+address}] = {read_data[i]:#0x}")
|
||||||
|
|
||||||
for i in range(byte_count):
|
for i in range(byte_count):
|
||||||
if read_data[i] != bin_data[i]:
|
if read_data[i] != bin_data[i]:
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ DEFAULT_OPENOCD_SCRIPTS_PATH = os.path.join(
|
|||||||
|
|
||||||
supported_formats = [".hex"]
|
supported_formats = [".hex"]
|
||||||
|
|
||||||
|
is_verbose = False
|
||||||
|
|
||||||
def test_connection():
|
def test_connection():
|
||||||
output = ""
|
output = ""
|
||||||
@@ -244,6 +245,8 @@ def createParser():
|
|||||||
default=OpenOcdTclRpc.DEFAULT_PORT)
|
default=OpenOcdTclRpc.DEFAULT_PORT)
|
||||||
parser.add_argument('--keep-halt', dest='keep_halt',
|
parser.add_argument('--keep-halt', dest='keep_halt',
|
||||||
action='store_true', default=False)
|
action='store_true', default=False)
|
||||||
|
parser.add_argument('--verbose', dest='is_verbose',
|
||||||
|
action='store_true', default=False)
|
||||||
# parser.add_argument('-b', '--boot-mode', default='undefined')
|
# parser.add_argument('-b', '--boot-mode', default='undefined')
|
||||||
|
|
||||||
return parser
|
return parser
|
||||||
@@ -252,6 +255,7 @@ def createParser():
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
parser = createParser()
|
parser = createParser()
|
||||||
namespace = parser.parse_args()
|
namespace = parser.parse_args()
|
||||||
|
is_verbose = namespace.is_verbose
|
||||||
|
|
||||||
if namespace.filepath:
|
if namespace.filepath:
|
||||||
upload_file(
|
upload_file(
|
||||||
|
|||||||
Reference in new issue
Block a user