コード例 #1
0
ファイル: __init__.py プロジェクト: kahnevan/eCMD
 def __enter__(self):
     _rcwrap(ecmd.ecmdLoadDll(self.dll, self.version))
     setGlobalVar(ecmd.ECMD_GLOBALVAR_QUIETERRORMODE, 1)
     if self.args:
         _rcwrap(ecmd.ecmdCommandArgs(self.args))
     for (name, version) in self.extensions.items():
         getattr(ecmd, name + "InitExtension")(version)
     return self
コード例 #2
0
ファイル: __init__.py プロジェクト: mklight/eCMD
 def __enter__(self):
     _rcwrap(ecmd.ecmdLoadDll(self.dll, self.version))
     setGlobalVar(ecmd.ECMD_GLOBALVAR_QUIETERRORMODE, 1)
     if self.args:
         _rcwrap(ecmd.ecmdCommandArgs(self.args))
     for (name, version) in self.extensions.items():
         getattr(ecmd, name+"InitExtension")(version)
     return self
コード例 #3
0
ファイル: xscom_ecmd.py プロジェクト: zdemat/oc-utils
    def __init__(self, chip_id, debug=False):
        rc = ecmd.ecmdLoadDll(os.environ['ECMD_DLL_FILE'], "ver13,ver14")
        if (rc):
            print("ERROR: problem on dll load")
        #setup chip target
        self.tgt = ecmd.ecmdChipTarget()
        self.tgt.chipType = "pu"
        self.tgt.cage = 0
        self.tgt.node = 0
        self.tgt.slot = 0
        self.tgt.pos = chip_id
        self.tgt.core = 0

        #self.looper = ecmd.ecmdLooperData();

        #rc = ecmd.ecmdConfigLooperInit(self.tgt, ecmd.ECMD_ALL_TARGETS_LOOP, self.looper)
        #if (rc):
        #    print("ERROR: problem calling ecmdConfigLooperInit")

        self.debug = debug
コード例 #4
0
ファイル: example.py プロジェクト: djlambert/eCMD
print("The value is 0x%s" % edb.genHexLeftStr(0, 64))
print("The value is 0x%s" % edb.genHexLeftStr())

testNum+=1; print("edb %02d) Call genBinStr, result should be the binary version of the test above" % testNum)
edb.setBitLength(64)
edb.setWord(0, 0xFFFF8000)
edb.setWord(1, 0x0001FFFF)
print("The value is %s" % edb.genBinStr(0, 64))
print("The value is %s" % edb.genBinStr())

# Plugin tests using the stub dll
print("\n\n")
testNum = 0

testNum+=1; print("dll %02d) Load the plugin" % testNum)
rc = ecmd.ecmdLoadDll(os.environ['ECMD_DLL_FILE'], "ver13,ver14")
if (rc):
    print("ERROR: problem on dll load")

for i in sys.argv:
    print(i)

#print("type argv: %s" % type(sys.argv))
#print("type argv[0]: %s" % type(sys.argv[0]))
#print("type argv[1]: %s" % type(sys.argv[1]))

rc = ecmd.ecmdCommandArgs(sys.argv)
if (rc):
    print("ERROR: problem calling ecmdCommandArgs")

for i in sys.argv:
コード例 #5
0
ファイル: example.py プロジェクト: kahnevan/eCMD
print(binascii.hexlify(baData))

indb = ecmd.ecmdDataBuffer(128)
indb.memCopyIn(baData, len(baData))
print(indb.genHexLeftStr())

# Similar syntax works for the insert/insertFromRight/extract databuffer
# functions as well

# Plugin tests using the stub dll
print("\n\n")
testNum = 0

testNum += 1
print("dll %02d) Load the plugin" % testNum)
rc = ecmd.ecmdLoadDll(os.environ['ECMD_DLL_FILE'], "ver14,ver15")
if (rc):
    print("ERROR: problem on dll load")

for i in sys.argv:
    print(i)

#print("type argv: %s" % type(sys.argv))
#print("type argv[0]: %s" % type(sys.argv[0]))
#print("type argv[1]: %s" % type(sys.argv[1]))

rc = ecmd.ecmdCommandArgs(sys.argv)
if (rc):
    print("ERROR: problem calling ecmdCommandArgs")

for i in sys.argv: