Skip to content

Commit

Permalink
Updated tools to load srec from file.
Browse files Browse the repository at this point in the history
  • Loading branch information
isuru-c-p committed Aug 16, 2012
1 parent b25a7f9 commit 07f2f85
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tools/AssemblyView.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ def onLoad(self,evt):
wx.MessageBox('error while loading srec file! - ' + str(e), 'Error', wx.OK | wx.ICON_ERROR)
def loadSrec(self,fname):
self.av.dbg.dbgBreak()
for line in open(fname):
self.av.dbg.loadSrec(line,1)
self.av.dbg.filesrecload(fname,1)
#for line in open(fname):
# self.av.dbg.loadSrec(line,1)

app = wx.App()
frame = AssemblyView()
Expand Down
6 changes: 6 additions & 0 deletions tools/mips32emu/DbgEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,9 @@ def loadSrec(self,srecString,setEntry):
res = self.s.recv(1024)
if not res.startswith('ok'):
raise CommandException("loading srec string failed")

def filesrecload(self,srecFilePath,setEntry):
self.s.send("filesrecload %s %s" % (setEntry,srecFilePath))
res = self.s.recv(1024)
if not res.startswith('ok'):
raise CommandException("loading srec file failed")
6 changes: 4 additions & 2 deletions tools/srecLoader.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import sys
import mips32emu.DbgEngine
import os


if __name__ == "__main__":
Expand All @@ -11,8 +12,9 @@
else:
setEntry = 0

for line in open(sys.argv[1]):
dbg.loadSrec(line,setEntry)
#for line in open(sys.argv[1]):
# dbg.loadSrec(line,setEntry)
dbg.filesrecload(os.path.abspath(sys.argv[1]),setEntry)



Expand Down

0 comments on commit 07f2f85

Please sign in to comment.