mik32-uploader/mik32_ram.py
2023-04-05 17:35:07 +03:00

12 lines
316 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")