forked from M-Labs/artiq
flash: use the handle
This commit is contained in:
parent
7bdf373b95
commit
b81b40d553
|
@ -98,7 +98,6 @@ def main():
|
||||||
bin = os.path.join(opts.dir, "top.bin")
|
bin = os.path.join(opts.dir, "top.bin")
|
||||||
if not os.access(bin, os.R_OK):
|
if not os.access(bin, os.R_OK):
|
||||||
bin_handle, bin = tempfile.mkstemp()
|
bin_handle, bin = tempfile.mkstemp()
|
||||||
bin_handle.close()
|
|
||||||
bit = os.path.join(opts.dir, "top.bit")
|
bit = os.path.join(opts.dir, "top.bit")
|
||||||
conv = True
|
conv = True
|
||||||
prog.append("jtagspi_program {} 0x{:x}".format(
|
prog.append("jtagspi_program {} 0x{:x}".format(
|
||||||
|
@ -122,7 +121,7 @@ def main():
|
||||||
prog.append("exit")
|
prog.append("exit")
|
||||||
try:
|
try:
|
||||||
if conv:
|
if conv:
|
||||||
bit2bin(bit, bin)
|
bit2bin(bit, bin_handle)
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
"openocd",
|
"openocd",
|
||||||
"-f", os.path.join("board", opts.target + ".cfg"),
|
"-f", os.path.join("board", opts.target + ".cfg"),
|
||||||
|
|
Loading…
Reference in New Issue