build/openocd: Fix tap name for zynq_7000
zynq_7000 have a special tap name fpr PL defined in openocd config file. Just hardcode it here. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
This commit is contained in:
parent
35dd87499c
commit
18720e29cc
|
@ -40,6 +40,12 @@ class OpenOCD(GenericProgrammer):
|
||||||
])
|
])
|
||||||
self.call(["openocd", "-f", config, "-c", script])
|
self.call(["openocd", "-f", config, "-c", script])
|
||||||
|
|
||||||
|
def get_tap_name(self, config):
|
||||||
|
cfg_str = open(config).read()
|
||||||
|
if "zynq_7000" in cfg_str:
|
||||||
|
return "zynq_pl.bs"
|
||||||
|
return "$_CHIPNAME.tap"
|
||||||
|
|
||||||
def get_ir(self, chain, config):
|
def get_ir(self, chain, config):
|
||||||
cfg_str = open(config).read()
|
cfg_str = open(config).read()
|
||||||
# Lattice ECP5.
|
# Lattice ECP5.
|
||||||
|
@ -98,6 +104,7 @@ class OpenOCD(GenericProgrammer):
|
||||||
- TX valid : bit 9
|
- TX valid : bit 9
|
||||||
"""
|
"""
|
||||||
config = self.find_config()
|
config = self.find_config()
|
||||||
|
tap_name = self.get_tap_name(config)
|
||||||
ir = self.get_ir(chain, config)
|
ir = self.get_ir(chain, config)
|
||||||
endstate = self.get_endstate(config)
|
endstate = self.get_endstate(config)
|
||||||
cfg = """
|
cfg = """
|
||||||
|
@ -186,8 +193,8 @@ proc jtagstream_serve {tap port} {
|
||||||
script = "; ".join([
|
script = "; ".join([
|
||||||
"init",
|
"init",
|
||||||
"poll off",
|
"poll off",
|
||||||
"irscan $_CHIPNAME.tap {:d}".format(ir),
|
"irscan {} {:d}".format(tap_name, ir),
|
||||||
"jtagstream_serve $_CHIPNAME.tap {:d}".format(port),
|
"jtagstream_serve {} {:d}".format(tap_name, port),
|
||||||
"exit",
|
"exit",
|
||||||
])
|
])
|
||||||
self.call(["openocd", "-f", config, "-f", "stream.cfg", "-c", script])
|
self.call(["openocd", "-f", config, "-f", "stream.cfg", "-c", script])
|
||||||
|
|
Loading…
Reference in New Issue