Example #1
0
File: cli.py Project: hacki11/wic
def cli(ctx, workspace, id):
    global cmgr
    cmgr = ic.ConnectionMgr()
    global config
    config = Config(cmgr, workspace, id)
    ctx.obj = config
    pass
Example #2
0
 def _connectToWinIDEA(self):
     # sp.Popen(['/home/isystem/bin/9_17_109_0_89947/winidea.sh', self.workspaceFileName])
     cmgr = ic.ConnectionMgr()
     cmgr.connectMRU(self.workspaceFileName)
     self.debugCtrl = ic.CDebugFacade(cmgr)
     self.ideCtrl = ic.CIDEController(cmgr)
     self.loaderCtrl = ic.CLoaderController(cmgr)
Example #3
0
  def __init__(self):
    """
    Initializes debug object.

    Connects to winIDEA.
    """
    self.cmgr = ic.ConnectionMgr()
    self.cmgr.connectMRU()
    self.debug = ic.CDebugFacade(self.cmgr)
    def force_rtc(self):
        self.text.tag_config('warning', background="yellow", foreground="red")
        self.text.tag_config('OK', background="white", foreground="green")
        try:
            import isystem.connect as ic
            cmgr = ic.ConnectionMgr()
            cmgr.connectMRU('')
            debugCtrl = ic.CDebugFacade(cmgr)
            dataCtrl = ic.CDataController(cmgr)

            self.text.insert(tk.END, "Setting wakeup from tranciever value to Validated" + "\n")
            dataCtrl.modify(ic.IConnectDebug.fRealTime, 'BswM_EcuMWakeupState[0]', '2')
             # Check written value
            self.text.insert(tk.END, 'BswM_EcuMWakeupState[0] = ' + str(dataCtrl.evaluate(ic.IConnectDebug.fRealTime, 'BswM_EcuMWakeupState[0]').getLong()) + "\n", 'OK')
            self.text.insert(tk.END, "-----" + "\n")

            self.text.insert(tk.END, "Setting RTC wakeup value to Validated" + "\n")
            dataCtrl.modify(ic.IConnectDebug.fRealTime, 'BswM_EcuMWakeupState[2]', '2')
            self.text.insert(tk.END, 'BswM_EcuMWakeupState[2] = ' + str(dataCtrl.evaluate(ic.IConnectDebug.fRealTime, 'BswM_EcuMWakeupState[2]').getLong()) + "\n", 'OK')
            self.text.insert(tk.END, "-----" + "\n")

            self.text.insert(tk.END, "Setting EcuM_ValidatedWakeups value to 2080(both TRCV and RTC)" + "\n")
            dataCtrl.modify(ic.IConnectDebug.fRealTime, 'EcuM_ValidatedWakeups', '2080')
            self.text.insert(tk.END, 'EcuM_ValidatedWakeups = ' + str(dataCtrl.evaluate(ic.IConnectDebug.fRealTime, 'EcuM_ValidatedWakeups').getLong()) + "\n", 'OK')
            self.text.insert(tk.END, "-----" + "\n")


            # Search for line Rte_Write_my_function(my_variable);'.
            lineDesc = ic.CLineDescription(ic.CLineDescription.E_RESOURCE_FUNCTION,
                                            'Rte_Write_my_function(my_variable);',
                                            0,     # start at the beginning of a function
                                            True,  # perform search
                                            0,     # no limit
                                            ic.CLineDescription.E_SEARCH_ANY,
                                            ic.CLineDescription.E_MATCH_PLAIN,
                                            "}",
                                            0,
                                            fileLocation)

            lineLocation = addrCtrl.getSourceLocation(lineDesc)
            print('file: ', lineLocation.getFileName())
            print('line: ', lineLocation.getLineNumber())
            self.text.insert(tk.END, 'file: ' + lineLocation.getFileName() + "\n", 'OK')
            self.text.insert(tk.END, 'line: ' + lineLocation.getLineNumber() + "\n", 'OK')
        except:
            self.text.insert(tk.END, "Winidea is not present on this computer!" + "\n", 'warning')
# Initialization script
# Created by winIDEA
import isystem.connect as ic
cmgr = ic.ConnectionMgr()
cmgr.connectMRU('')
debug = ic.CDebugFacade(cmgr)

try:
    debug.modify(ic.IConnectDebug.fMonitor, '@"TIM2/PSC"', '8')
    debug.modify(ic.IConnectDebug.fMonitor, '@"TIM2/ARR"', '8547')
    debug.modify(ic.IConnectDebug.fMonitor, '@"TIM21/PSC"', '9999')
    debug.modify(ic.IConnectDebug.fMonitor, '@"TIM21/ARR"', '6400')
except Exception as ex:
    print(ex)
Example #6
0
 def _connectToWinIDEA(self):
     cmgr = ic.ConnectionMgr()
     cmgr.connectMRU(self.workspaceFileName)
     self.debugCtrl = ic.CDebugFacade(cmgr)
     self.ideCtrl = ic.CIDEController(cmgr)
     self.loaderCtrl = ic.CLoaderController(cmgr)