Skip to content
Snippets Groups Projects
Commit ec7d924d authored by Sri Krishna Madireddy's avatar Sri Krishna Madireddy
Browse files

Add RDP support for new dcc_parser changes

With new dcc_parser support DCC_SRAM.BIN is directtly
passed with given offset to read register information.

Change-Id: I84225fd63034a652de1ed67644251aa0e045b310
parent 34f7e5e4
No related branches found
No related tags found
No related merge requests found
...@@ -93,7 +93,7 @@ def read_config(config_pt): ...@@ -93,7 +93,7 @@ def read_config(config_pt):
track_len = 4 track_len = 4
if options.config_offset is not None: if options.config_offset is not None:
config_pt.seek(options.config_offset, 1) config_pt.seek(int(options.config_offset, 16), 1)
while True: while True:
word = config_pt.read(4) word = config_pt.read(4)
......
...@@ -458,9 +458,10 @@ class DebugImage_v2(): ...@@ -458,9 +458,10 @@ class DebugImage_v2():
subprocess.call('{0} -c {1} exit'.format(qtf_path, port)) subprocess.call('{0} -c {1} exit'.format(qtf_path, port))
server_proc.communicate('quit') server_proc.communicate('quit')
def parse_dcc(self, ram_dump): def parse_dcc(self, ram_dump, config_offset):
out_dir = ram_dump.outdir out_dir = ram_dump.outdir
bin_dir = ram_dump.ram_addr
bin_dir="\\".join(bin_dir[0][0].split('\\')[:-1])
dcc_parser_path = os.path.join(os.path.dirname(__file__), '..', 'dcc_parser', 'dcc_parser.py') dcc_parser_path = os.path.join(os.path.dirname(__file__), '..', 'dcc_parser', 'dcc_parser.py')
if dcc_parser_path is None: if dcc_parser_path is None:
...@@ -471,16 +472,17 @@ class DebugImage_v2(): ...@@ -471,16 +472,17 @@ class DebugImage_v2():
print_out_str("!!! dcc_parser_path {0} does not exist! Check your settings!".format(dcc_parser_path)) print_out_str("!!! dcc_parser_path {0} does not exist! Check your settings!".format(dcc_parser_path))
return return
if os.path.getsize(os.path.join(out_dir, 'sram.bin')) > 0: if os.path.isfile(os.path.join(out_dir, 'sram.bin')) > 0:
sram_file = os.path.join(out_dir, 'sram.bin') sram_file = os.path.join(out_dir, 'sram.bin')
elif os.path.isfile(os.path.join(bin_dir, 'DCC_SRAM.BIN')):
sram_file = os.path.join(bin_dir, 'DCC_SRAM.BIN')
else: else:
return return
bin_dir = ram_dump.ram_addr
bin_dir="\\".join(bin_dir[0][0].split('\\')[:-1]) if (os.path.isfile(os.path.join(bin_dir, 'DCC_SRAM.BIN'))) and (config_offset != None):
if (os.path.isfile(os.path.join(bin_dir, 'DCC_SRAM.BIN'))): cmd = ["-s ", sram_file, " --out-dir ", out_dir, " --config-offset ", str(config_offset), " --v2"]
p = subprocess.Popen([sys.executable, dcc_parser_path, '-s', sram_file, '--out-dir', out_dir, '--v2'], p = subprocess.Popen([sys.executable, dcc_parser_path, cmd], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
stdout=subprocess.PIPE, stderr=subprocess.STDOUT) elif config_offset == None:
else:
p = subprocess.Popen([sys.executable, dcc_parser_path, '-s', sram_file, '--out-dir', out_dir], p = subprocess.Popen([sys.executable, dcc_parser_path, '-s', sram_file, '--out-dir', out_dir],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT) stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
...@@ -806,7 +808,9 @@ class DebugImage_v2(): ...@@ -806,7 +808,9 @@ class DebugImage_v2():
self, 20, client_entry, self, 20, client_entry,
client_end, client_id, ram_dump) client_end, client_id, ram_dump)
if ram_dump.dcc: if ram_dump.dcc:
self.parse_dcc(ram_dump) self.parse_dcc(ram_dump, config_offset = None)
else:
self.parse_dcc(ram_dump, config_offset = "0x6000")
if ram_dump.sysreg: if ram_dump.sysreg:
self.parse_sysreg(ram_dump) self.parse_sysreg(ram_dump)
self.qdss.dump_standard(ram_dump) self.qdss.dump_standard(ram_dump)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment