mik32-uploader/mik32_ram.py
Sergey Shchelkanov 06f6bd03cc updates
2023-03-27 18:03:20 +03:00

12 lines
310 B
Python

from tclrpc import TclException
from tclrpc import OpenOcdTclRpc
from pathlib import Path
def write_file(filename):
with OpenOcdTclRpc() as openocd:
openocd.halt()
print(openocd.run("load_image {%s} 0x0" % Path(filename)))
openocd.resume(0)
print("RAM write file maybe done")