mik32-uploader/mik32_ram.py
2023-04-11 11:17:15 +03:00

12 lines
318 B
Python

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