debug output wip

This commit is contained in:
Sergey Shchelkanov 2023-05-29 16:58:36 +03:00
parent 23666d49fa
commit 46c72768e0
2 changed files with 6 additions and 1 deletions

View File

@ -319,7 +319,8 @@ def spifi_read_data(openocd: OpenOcdTclRpc, address: int, byte_count: int, bin_d
for i in range(byte_count):
data8 = openocd.read_memory(SPIFI_CONFIG_DATA32, 8, 1)[0]
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):
if read_data[i] != bin_data[i]:

View File

@ -26,6 +26,7 @@ DEFAULT_OPENOCD_SCRIPTS_PATH = os.path.join(
supported_formats = [".hex"]
is_verbose = False
def test_connection():
output = ""
@ -244,6 +245,8 @@ def createParser():
default=OpenOcdTclRpc.DEFAULT_PORT)
parser.add_argument('--keep-halt', dest='keep_halt',
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')
return parser
@ -252,6 +255,7 @@ def createParser():
if __name__ == '__main__':
parser = createParser()
namespace = parser.parse_args()
is_verbose = namespace.is_verbose
if namespace.filepath:
upload_file(