Hi,
I 'm translating a cmm script to a jython script . Need to translate CMM-style command Data.Long(ZSD:®Addr) .Not sure how to do it, especially about this flag ZSD. Would somebody guide me how to do it? Thanks.
Jerry
Hi Jerry,According to the Lauterbach docs on the web:Data.Long() reads a long value (32-bit) value from memory.andZSD means access the data in secure supervisor mode at virtual address location.The Arm Debugger (DS-5 or Arm DS) offers a number of "address prefixes" to allow you to qualify an address, as described at:developer.arm.com/.../address-space-prefixesTo read in Secure mode, specify the S: prefix on the address. The Arm Debugger will access virtual addresses by default, unless you've used the SP: or NP: address prefixes that turn off the MMU temporarily.So the corresponding lines in Jython forData.Long(ZSD:®Addr) would be: ec = debugger.getCurrentExecutionContext()value = ec.getMemoryService().readMemory32(S:address)Or the equivalent:value = debugger.readMemory(S:address, 4)Hope this helps,
Hi Stephen,
Thanks a lot for replying.
There is Syntax Error.
source "init.py" ERROR(?): SyntaxError: no viable alternative at input ':' File "init.py", line 21 status = debugger.readMemory(S:regAddr, 4) ^ ERROR(CMD656): The script init.py failed to complete due to an error during execution of the script source "init.py" ERROR(?): SyntaxError: no viable alternative at input ':' File "init.py", line 23 status = ec.getMemoryService().readMemory32(S:regaddr) ^ ERROR(CMD656): The script init.py failed to complete due to an error during execution of the script
Seems we can fix like this:
a = "S:" + str(regaddr) ec = debugger.getCurrentExecutionContext() status = ec.getMemoryService().readMemory32(a)
BTW, if we use debugger.readMemory. It's:
value = debugger.readMemory(S:address, 32)
not
value = debugger.readMemory(S:address, 4)
right?