mirror of
https://github.com/MikronMIK32/mik32-uploader.git
synced 2026-10-29 18:11:13 +03:00
fix spi, fix uart stuff
This commit is contained in:
1 parent
06f6bd03cc
commit
0399d3110c
3 files changed
+6
-2
No files matched your search
+1
-1
@@ -73,7 +73,7 @@ def parse_hex(file: str) -> dict:
|
||||
elif rectype == 4: # Extended Linear Address Record
|
||||
print("Extended Linear Address Record")
|
||||
print("ERROR: unimplemented record type 4 on line %i" % (i+1))
|
||||
is_error = True
|
||||
# is_error = True
|
||||
elif rectype == 5: # Start Linear Address Record
|
||||
print("Start Linear Address is 0x%s (line %i)" %
|
||||
(data_bytes_line, (i+1)))
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ from pathlib import Path
|
||||
def write_file(filename):
|
||||
|
||||
with OpenOcdTclRpc() as openocd:
|
||||
openocd.halt()
|
||||
openocd.reset_halt()
|
||||
print(openocd.run("load_image {%s} 0x0" % Path(filename)))
|
||||
openocd.resume(0)
|
||||
print("RAM write file maybe done")
|
||||
@@ -90,6 +90,10 @@ class OpenOcdTclRpc:
|
||||
raise TclException(code, msg)
|
||||
else:
|
||||
return msg
|
||||
|
||||
def reset_halt(self):
|
||||
"""Halt MCU and raise an error if it returns an error"""
|
||||
return self.run("capture \"reset halt\"")
|
||||
|
||||
def halt(self):
|
||||
"""Halt MCU and raise an error if it returns an error"""
|
||||
|
||||
Reference in new issue
Block a user