コード例 #1
0
 def callbackOk(self, event):
     self._getBusWidth()
     self._getTimingInterface()
     self._getPartitionAccess()
     self._getEnableBootConfig()
     # enableBootConfig = self.usdhcMmcOpt0 & 0x00000001
     # if enableBootConfig:
     self._getBootBusWidth()
     self._getBootMode()
     self._getEnableBootPartition()
     self._getEnableBootAck()
     self._getResetBootBusConditions()
     if self.hasMultiUsdhcBootInstance:
         self._getInstance()
     self._getEnable1V8()
     self._getEnablePowerCycle()
     self._getPowerPolarity()
     self._getPowerUpTime()
     self._getPowerDownTime()
     self._getRsvFields()
     uivar.setBootDeviceConfiguration(RTyyyy_uidef.kBootDevice_UsdhcMmc,
                                      self.usdhcMmcOpt0, self.usdhcMmcOpt1)
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2],
                           uidef.kSoundEffectFilename_Progress)
コード例 #2
0
 def callbackOk(self, event):
     self._getDeviceType()
     self._getQueryPads()
     self._getCmdPads()
     self._getQuadModeSetting()
     self._getMiscMode()
     self._getMaxFrequency()
     self._getHasOpt1()
     hasOption1 = (self.flexspiNorOpt0 & 0x0F000000) >> 24
     if hasOption1:
         self._getFlashConnection()
         self._getDriveStrength()
         self._getDqsPinmuxGroup()
         self._getEnableSecondPinmux()
         self._getStatusOverride()
         self._getDummyCycles()
     uivar.setBootDeviceConfiguration(uidef.kBootDevice_FlexspiNor,
                                      self.flexspiNorOpt0,
                                      self.flexspiNorOpt1,
                                      self.flexspiDeviceModel)
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2],
                           uidef.kSoundEffectFilename_Progress)
 def callbackOk(self, event):
     self._getTotalRegions()
     for i in range(self.userKeyCtrlDict['total_regions']):
         if not self._getRegionInfo(i):
             return
     self._getXipBaseAddr()
     self._getKekSource()
     if not self._getKekData():
         return
     if not self._getScrambleArg():
         return
     self.userKeyCtrlDict['hw_eng'] = 'otfad'
     #print 'base_addr=' + self.userKeyCmdDict['base_addr']
     #print 'kek=' + self.userKeyCmdDict['kek']
     #print 'otfad_arg=' + self.userKeyCmdDict['otfad_arg']
     #print 'scramble=' + self.userKeyCmdDict['scramble']
     #print 'scramble_align=' + self.userKeyCmdDict['scramble_align']
     #print 'otfad_ctx_lock=' + self.userKeyCmdDict['otfad_ctx_lock']
     uivar.setAdvancedSettings(uidef.kAdvancedSettings_UserKeys,
                               self.userKeyCtrlDict, self.userKeyCmdDict)
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2],
                           uidef.kSoundEffectFilename_Progress)
コード例 #4
0
ファイル: uicore.py プロジェクト: lgl88911/NXP-MCUBootUtility
 def checkIfSubWinHasBeenOpened( self ):
     runtimeSettings = uivar.getRuntimeSettings()
     if not runtimeSettings[0]:
         uivar.setRuntimeSettings(True)
         return False
     else:
         return True
コード例 #5
0
 def callbackOk(self, event):
     self._getEngineSelection()
     if self.userKeyCtrlDict['engine_sel'] == uidef.kUserEngineSel_Engine0:
         if not self._getEngineInfo(0):
             return
     elif self.userKeyCtrlDict[
             'engine_sel'] == uidef.kUserEngineSel_Engine1:
         if not self._getEngineInfo(1):
             return
     elif self.userKeyCtrlDict[
             'engine_sel'] == uidef.kUserEngineSel_BothEngines:
         if not self._getEngineInfo(0):
             return
         if not self._getEngineInfo(1):
             return
     else:
         pass
     self._getBeeEngKeySelection()
     self._getImageType()
     self._getXipBaseAddr()
     #print 'base_addr=' + self.userKeyCmdDict['base_addr']
     #print 'engine0_key=' + self.userKeyCmdDict['engine0_key'] + \
     #      ' engine0_arg=' + self.userKeyCmdDict['engine0_arg'] + \
     #      ' engine0_lock=' + self.userKeyCmdDict['engine0_lock']
     #print 'engine1_key=' + self.userKeyCmdDict['engine1_key'] + \
     #      ' engine1_arg=' + self.userKeyCmdDict['engine1_arg'] + \
     #      ' engine1_lock=' + self.userKeyCmdDict['engine1_lock']
     #print 'use_zero_key=' + self.userKeyCmdDict['use_zero_key']
     #print 'is_boot_image=' + self.userKeyCmdDict['is_boot_image']
     uivar.setAdvancedSettings(uidef.kAdvancedSettings_UserKeys,
                               self.userKeyCtrlDict, self.userKeyCmdDict)
     uivar.setRuntimeSettings(False)
     self.Show(False)
 def callbackOk( self, event ):
     self._getEngineSelection()
     if self.userKeyCtrlDict['engine_sel'] == RTyyyy_uidef.kUserEngineSel_Engine0:
         if not self._getEngineInfo(0):
             return
     elif self.userKeyCtrlDict['engine_sel'] == RTyyyy_uidef.kUserEngineSel_Engine1:
         if not self._getEngineInfo(1):
             return
     elif self.userKeyCtrlDict['engine_sel'] == RTyyyy_uidef.kUserEngineSel_BothEngines:
         if not self._getEngineInfo(0):
             return
         if not self._getEngineInfo(1):
             return
     else:
         pass
     self._getBeeEngKeySelection()
     self._getImageType()
     self._getXipBaseAddr()
     self.userKeyCtrlDict['hw_eng'] = 'bee'
     #print 'base_addr=' + self.userKeyCmdDict['base_addr']
     #print 'engine0_key=' + self.userKeyCmdDict['engine0_key'] + \
     #      ' engine0_arg=' + self.userKeyCmdDict['engine0_arg'] + \
     #      ' engine0_lock=' + self.userKeyCmdDict['engine0_lock']
     #print 'engine1_key=' + self.userKeyCmdDict['engine1_key'] + \
     #      ' engine1_arg=' + self.userKeyCmdDict['engine1_arg'] + \
     #      ' engine1_lock=' + self.userKeyCmdDict['engine1_lock']
     #print 'use_zero_key=' + self.userKeyCmdDict['use_zero_key']
     #print 'is_boot_image=' + self.userKeyCmdDict['is_boot_image']
     uivar.setAdvancedSettings(uidef.kAdvancedSettings_UserKeys, self.userKeyCtrlDict, self.userKeyCmdDict)
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2], uidef.kSoundEffectFilename_Progress)
コード例 #7
0
 def callbackOk( self, event ):
     self._getKeepFdcb()
     if self.flexspiDeviceModel == 'Complete_FDCB':
         if not (os.path.isfile(self.cfgFdcbBinFilename) and os.path.getsize(self.cfgFdcbBinFilename) == memdef.kMemBlockSize_FDCB):
             self.popupMsgBox('FDCB has not been specified!')
             return
     else:
         self._getDeviceType()
         self._getQueryPads()
         self._getCmdPads()
         self._getQuadModeSetting()
         self._getMiscMode()
         self._getMaxFrequency()
         self._getHasOpt1()
         hasOption1 = (self.flexspiNorOpt0 & 0x0F000000) >> 24
         if hasOption1:
             self._getFlashConnection()
             self._getDriveStrength()
             self._getDqsPinmuxGroup()
             self._getEnableSecondPinmux()
             self._getStatusOverride()
             self._getDummyCycles()
     uivar.setBootDeviceConfiguration(uidef.kBootDevice_XspiNor, self.flexspiNorOpt0, self.flexspiNorOpt1, self.flexspiDeviceModel, self.isFdcbKept)
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2], uidef.kSoundEffectFilename_Progress)
コード例 #8
0
 def callbackOk( self, event ):
     self._getKeySource()
     self._getAesMode()
     self._getEncryptedRegionCount()
     if not self._getEncryptedRegionInfo():
         return
     uivar.setAdvancedSettings(uidef.kAdvancedSettings_OtpmkKey, self.otpmkKeyOpt, self.otpmkEncryptedRegionStartList, self.otpmkEncryptedRegionLengthList)
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2], uidef.kSoundEffectFilename_Progress)
コード例 #9
0
 def callbackOk(self, event):
     if self.signSettingsDict['isPartSigned']:
         if not self._getSignRegionInfo():
             return
     uivar.setAdvancedSettings(uidef.kAdvancedSettings_Sign,
                               self.signSettingsDict)
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2],
                           uidef.kSoundEffectFilename_Progress)
コード例 #10
0
ファイル: uicore.py プロジェクト: lgl88911/NXP-MCUBootUtility
 def setSoundEffect( self ):
     if self.m_menuItem_soundEffectQuiet.IsChecked():
         self.soundEffectType = 'quiet'
     elif self.m_menuItem_soundEffectMario.IsChecked():
         self.soundEffectType = 'mario'
     elif self.m_menuItem_soundEffectContra.IsChecked():
         self.soundEffectType = 'contra'
     else:
         pass
     self.toolCommDict['soundEffectType'] = self.soundEffectType
     uivar.setRuntimeSettings(None, None, self.soundEffectType)
コード例 #11
0
 def callbackOk(self, event):
     self._getDeviceType()
     self._getPageSize()
     self._getSectorSize()
     self._getTotalSize()
     self._getSpiIndex()
     self._getSpiPcs()
     self._getSpiSpeed()
     uivar.setBootDeviceConfiguration(uidef.kBootDevice_LpspiNor, self.lpspiNorOpt0, self.lpspiNorOpt1)
     uivar.setRuntimeSettings(False)
     self.Show(False)
コード例 #12
0
 def callbackOk(self, event):
     self._getTimingMode()
     self._getADVPolarity()
     self._getDataPortSize()
     self._getPCSPort()
     self._getCommandSet()
     uivar.setBootDeviceConfiguration(RTyyyy_uidef.kBootDevice_SemcNor,
                                      self.semcNorOpt, self.semcNorSetting,
                                      self.semcNorDeviceModel)
     uivar.setRuntimeSettings(False)
     self.Show(False)
コード例 #13
0
 def callbackOk(self, event):
     self._getCstVersion()
     self._getUseExistingCaKey()
     self._getUseEllipticCurveCrypto()
     self._getPkiTreeKeyLen()
     self._getPkiTreeDuration()
     self._getSRKs()
     self._getCaFlagSet()
     uivar.setAdvancedSettings(uidef.kAdvancedSettings_Cert,
                               self.certSettingsDict)
     uivar.setRuntimeSettings(False)
     self.Show(False)
コード例 #14
0
 def callbackOk(self, event):
     self._getDeviceType()
     self._getPageSize()
     self._getSectorSize()
     self._getTotalSize()
     self._getSpiIndex()
     self._getSpiPcs()
     self._getSpiSpeed()
     uivar.setBootDeviceConfiguration(RTyyyy_uidef.kBootDevice_LpspiNor, self.lpspiNorOpt0, self.lpspiNorOpt1)
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2], uidef.kSoundEffectFilename_Progress)
コード例 #15
0
 def callbackOk( self, event ):
     if self.hasMultiUsdhcBootInstance:
         self._getInstance()
     self._getBusWidth()
     self._getTimingInterface()
     self._getEnablePowerCycle()
     self._getPowerPolarity()
     self._getPowerUpTime()
     self._getPowerDownTime()
     uivar.setBootDeviceConfiguration(RTyyyy_uidef.kBootDevice_UsdhcSd, self.usdhcSdOpt)
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2], uidef.kSoundEffectFilename_Progress)
コード例 #16
0
 def callbackOk(self, event):
     self._getDeviceType()
     self._getQueryPads()
     self._getCmdPads()
     self._getQuadModeSetting()
     self._getMiscMode()
     self._getMaxFrequency()
     self._getHasOpt1()
     uivar.setBootDeviceConfiguration(uidef.kBootDevice_FlexspiNor,
                                      self.flexspiNorOpt0,
                                      self.flexspiNorOpt1,
                                      self.flexspiDeviceModel)
     uivar.setRuntimeSettings(False)
     self.Show(False)
コード例 #17
0
 def callbackOk( self, event ):
     self._getOnfiVersion()
     self._getEdoMode()
     self._getOnfiTimingMode()
     self._getIoPortSize()
     self._getPcsPort()
     self._getEccType()
     self._getEccStatus()
     self._getSearchCount()
     self._getSearchStride()
     self._getImageCopies()
     self._getImageInfo()
     uivar.setBootDeviceConfiguration(uidef.kBootDevice_SemcNand, self.semcNandOpt, self.semcNandFcbOpt, self.semcNandImageInfoList)
     uivar.setRuntimeSettings(False)
     self.Show(False)
コード例 #18
0
 def callbackOk(self, event):
     self._getDcdSource()
     if not self._getDcdBinFile():
         return
     if not self._getDcdCfgFile():
         return
     if not self._getSdramBase():
         return
     if not self._getDcdDesc():
         return
     uivar.setBootDeviceConfiguration(uidef.kBootDevice_Dcd,
                                      self.dcdCtrlDict,
                                      self.dcdSettingsDict)
     uivar.setRuntimeSettings(False)
     self.Show(False)
コード例 #19
0
 def callbackOk(self, event):
     self._getCstVersion()
     self._getUseExistingCaKey()
     self._getUseEllipticCurveCrypto()
     self._getPkiTreeKeyLen()
     self._getPkiTreeDuration()
     self._getSRKs()
     self._getCaFlagSet()
     uivar.setAdvancedSettings(uidef.kAdvancedSettings_Cert,
                               self.certSettingsDict)
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2],
                           uidef.kSoundEffectFilename_Progress)
コード例 #20
0
 def callbackOk( self, event ):
     self._accessTag(kAccessType_Get)
     self._accessVersion(kAccessType_Get)
     self._accessReadSampleClkSrc(kAccessType_Get)
     self._accessCsHoldTime(kAccessType_Get)
     self._accessCsSetupTime(kAccessType_Get)
     self._accessColumnAddressWidth(kAccessType_Get)
     self._accessDeviceModeCfgEnable(kAccessType_Get)
     self._accessDeviceModeType(kAccessType_Get)
     self._accessWaitTimeCfgCommands(kAccessType_Get)
     self._accessDeviceModeSeq(kAccessType_Get)
     self._accessDeviceModeArg(kAccessType_Get)
     self._accessConfigCmdEnable(kAccessType_Get)
     self._accessConfigModeType(kAccessType_Get)
     self._accessConfigCmdSeqs(kAccessType_Get)
     self._accessConfigCmdArgs(kAccessType_Get)
     self._accessControllerMiscOption(kAccessType_Get)
     self._accessDeviceType(kAccessType_Get)
     self._accessSflashPadType(kAccessType_Get)
     self._accessSerialClkFreq(kAccessType_Get)
     self._accessLutCustomSeqEnable(kAccessType_Get)
     self._accessSflashSize(kAccessType_Get)
     self._accessPadSettingOverride(kAccessType_Get)
     self._accessTimeoutInMs(kAccessType_Get)
     self._accessCommandInterval(kAccessType_Get)
     self._accessDataValidTime(kAccessType_Get)
     self._accessBusyOffset(kAccessType_Get)
     self._accessBusyBitPolarity(kAccessType_Get)
     self._accessLutCustomSeq(kAccessType_Get)
     self._accessPageSize(kAccessType_Get)
     self._accessSectorSize(kAccessType_Get)
     self._accessIpcmdSerialClkFreq(kAccessType_Get)
     self._accessIsUniformBlockSize(kAccessType_Get)
     self._accessIsDataOrderSwapped(kAccessType_Get)
     self._accessSerialNorType(kAccessType_Get)
     self._accessNeedExitNoCmdMode(kAccessType_Get)
     self._accessHalfClkForNonReadCmd(kAccessType_Get)
     self._accessNeedRestoreNoCmdMode(kAccessType_Get)
     self._accessBlockSize(kAccessType_Get)
     self._accessIsNonBlockingMode(kAccessType_Get)
     with open(self.cfgFdcbBinFilename, 'wb') as fileObj:
         fileObj.write(self.fdcbBuffer)
         fileObj.close()
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2], uidef.kSoundEffectFilename_Progress)
コード例 #21
0
 def callbackOk(self, event):
     self._getDeviceType()
     self._getQueryPads()
     self._getCmdPads()
     self._getQuadModeSetting()
     self._getMiscMode()
     self._getMaxFrequency()
     self._getHasOpt1()
     uivar.setBootDeviceConfiguration(uidef.kBootDevice_FlexspiNor,
                                      self.flexspiNorOpt0,
                                      self.flexspiNorOpt1,
                                      self.flexspiDeviceModel)
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2],
                           uidef.kSoundEffectFilename_Progress)
コード例 #22
0
 def callbackOk( self, event ):
     self._getKeySource()
     self._getAesMode()
     self._getEncryptedRegionCount()
     if not self._getRedundantImageOffset():
         return
     if not self._getEncryptedRegionInfo():
         return
     otpmkKeyCommDict = {'secureBootType':self.secureBootType,
                         'opt':self.otpmkKeyOpt,
                         'regionStartList':self.otpmkEncryptedRegionStartList,
                         'regionLengthList':self.otpmkEncryptedRegionLengthList}
     uivar.setAdvancedSettings(uidef.kAdvancedSettings_OtpmkKey, otpmkKeyCommDict)
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2], uidef.kSoundEffectFilename_Progress)
コード例 #23
0
 def callbackOk(self, event):
     self._getDeviceType()
     self._getPageSize()
     self._getSectorSize()
     self._getTotalSize()
     self._getSpiIndex()
     self._getSpiPcs()
     self._getSpiSpeed()
     if self.mcuSeries in uidef.kMcuSeries_iMXRTyyyy:
         uivar.setBootDeviceConfiguration(RTyyyy_uidef.kBootDevice_LpspiNor, self.recoverySpiNorOpt0, self.recoverySpiNorOpt0)
     elif self.mcuSeries == uidef.kMcuSeries_iMXRTxxx:
         uivar.setBootDeviceConfiguration(RTxxx_uidef.kBootDevice_FlexcommSpiNor, self.recoverySpiNorOpt0, self.recoverySpiNorOpt0)
     else:
         pass
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2], uidef.kSoundEffectFilename_Progress)
コード例 #24
0
 def callbackOk(self, event):
     self._getDcdSource()
     if not self._getDcdBinFile():
         return
     if not self._getDcdCfgFile():
         return
     if not self._getSdramBase():
         return
     if not self._getDcdDesc():
         return
     uivar.setBootDeviceConfiguration(uidef.kBootDevice_Dcd,
                                      self.dcdCtrlDict,
                                      self.dcdSettingsDict)
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2],
                           uidef.kSoundEffectFilename_Progress)
コード例 #25
0
 def callbackOk(self, event):
     self._getOnfiVersion()
     self._getEdoMode()
     self._getOnfiTimingMode()
     self._getIoPortSize()
     self._getPcsPort()
     self._getEccType()
     self._getEccStatus()
     self._getSearchCount()
     self._getSearchStride()
     self._getImageCopies()
     self._getImageInfo()
     uivar.setBootDeviceConfiguration(uidef.kBootDevice_SemcNand,
                                      self.semcNandOpt, self.semcNandFcbOpt,
                                      self.semcNandImageInfoList)
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2],
                           uidef.kSoundEffectFilename_Progress)
コード例 #26
0
 def callbackOk(self, event):
     self._getFlashSize()
     self._getHasMultiplanes()
     self._getPagesPerBlock()
     self._getPageSize()
     self._getMaxFreq()
     if not self._getManufacturerId():
         return
     self._getSearchCount()
     self._getSearchStride()
     self._getAddressType()
     self._getImageInfo()
     uivar.setBootDeviceConfiguration(RTyyyy_uidef.kBootDevice_FlexspiNand,
                                      self.flexspiNandOpt0,
                                      self.flexspiNandOpt1,
                                      self.flexspiNandFcbOpt,
                                      self.flexspiNandImageInfoList)
     uivar.setRuntimeSettings(False)
     self.Show(False)
     runtimeSettings = uivar.getRuntimeSettings()
     sound.playSoundEffect(runtimeSettings[1], runtimeSettings[2],
                           uidef.kSoundEffectFilename_Progress)
コード例 #27
0
 def callbackClose(self, event):
     uivar.setRuntimeSettings(False)
     self.Show(False)
コード例 #28
0
 def callbackOk( self, event ):
     self._getEfuseWord()
     uivar.setEfuseSettings(self.efuseDict)
     uivar.setRuntimeSettings(False)
     self.Show(False)
コード例 #29
0
ファイル: uicore.py プロジェクト: lgl88911/NXP-MCUBootUtility
    def setLanguage( self ):
        isEnglishLanguage = self.m_menuItem_english.IsChecked()
        self.toolCommDict['isEnglishLanguage'] = isEnglishLanguage
        lastIndex = self._getLastLangIndex()
        langIndex = 0
        if isEnglishLanguage:
            langIndex = uilang.kLanguageIndex_English
        else:
            langIndex = uilang.kLanguageIndex_Chinese
        self.languageIndex = langIndex
        uivar.setRuntimeSettings(None, None, None, self.languageIndex)
        self.m_menubar.SetMenuLabel(uilang.kMenuPosition_File, uilang.kMainLanguageContentDict['menu_file'][langIndex])
        self.m_menuItem_exit.SetItemLabel(uilang.kMainLanguageContentDict['mItem_exit'][langIndex])
        self.m_menubar.SetMenuLabel(uilang.kMenuPosition_Edit, uilang.kMainLanguageContentDict['menu_edit'][langIndex])
        self.m_menubar.SetMenuLabel(uilang.kMenuPosition_View, uilang.kMainLanguageContentDict['menu_view'][langIndex])
        # Hard way to set label for submenu
        self.m_menubar.SetMenuLabel(uilang.kMenuPosition_Tools, uilang.kMainLanguageContentDict['menu_tools'][langIndex])
        self.m_menu_tools.SetLabel(self.m_menu_tools.FindItem(uilang.kMainLanguageContentDict['subMenu_runMode'][lastIndex]), uilang.kMainLanguageContentDict['subMenu_runMode'][langIndex])
        self.m_menuItem_runModeEntry.SetItemLabel(uilang.kMainLanguageContentDict['mItem_runModeEntry'][langIndex])
        self.m_menuItem_runModeMaster.SetItemLabel(uilang.kMainLanguageContentDict['mItem_runModeMaster'][langIndex])
        self.m_menu_tools.SetLabel(self.m_menu_tools.FindItem(uilang.kMainLanguageContentDict['subMenu_usbDetection'][lastIndex]), uilang.kMainLanguageContentDict['subMenu_usbDetection'][langIndex])
        self.m_menuItem_usbDetectionDynamic.SetItemLabel(uilang.kMainLanguageContentDict['mItem_usbDetectionDynamic'][langIndex])
        self.m_menuItem_usbDetectionStatic.SetItemLabel(uilang.kMainLanguageContentDict['mItem_usbDetectionStatic'][langIndex])
        self.m_menu_tools.SetLabel(self.m_menu_tools.FindItem(uilang.kMainLanguageContentDict['subMenu_soundEffect'][lastIndex]), uilang.kMainLanguageContentDict['subMenu_soundEffect'][langIndex])
        self.m_menuItem_soundEffectContra.SetItemLabel(uilang.kMainLanguageContentDict['mItem_soundEffectContra'][langIndex])
        self.m_menuItem_soundEffectMario.SetItemLabel(uilang.kMainLanguageContentDict['mItem_soundEffectMario'][langIndex])
        self.m_menuItem_soundEffectQuiet.SetItemLabel(uilang.kMainLanguageContentDict['mItem_soundEffectQuiet'][langIndex])
        self.m_menu_tools.SetLabel(self.m_menu_tools.FindItem(uilang.kMainLanguageContentDict['subMenu_genSbFile'][lastIndex]), uilang.kMainLanguageContentDict['subMenu_genSbFile'][langIndex])
        self.m_menuItem_genSbFileYes.SetItemLabel(uilang.kMainLanguageContentDict['mItem_genSbFileYes'][langIndex])
        self.m_menuItem_genSbFileNo.SetItemLabel(uilang.kMainLanguageContentDict['mItem_genSbFileNo'][langIndex])
        self.m_menu_tools.SetLabel(self.m_menu_tools.FindItem(uilang.kMainLanguageContentDict['subMenu_imageReadback'][lastIndex]), uilang.kMainLanguageContentDict['subMenu_imageReadback'][langIndex])
        self.m_menuItem_imageReadbackAutomatic.SetItemLabel(uilang.kMainLanguageContentDict['mItem_imageReadbackAutomatic'][langIndex])
        self.m_menuItem_imageReadbackManual.SetItemLabel(uilang.kMainLanguageContentDict['mItem_imageReadbackManual'][langIndex])
        self.m_menu_tools.SetLabel(self.m_menu_tools.FindItem(uilang.kMainLanguageContentDict['subMenu_flashloaderResident'][lastIndex]), uilang.kMainLanguageContentDict['subMenu_flashloaderResident'][langIndex])
        self.m_menuItem_flashloaderResidentDefault.SetItemLabel(uilang.kMainLanguageContentDict['mItem_flashloaderResidentDefault'][langIndex])
        self.m_menuItem_flashloaderResidentItcm.SetItemLabel(uilang.kMainLanguageContentDict['mItem_flashloaderResidentItcm'][langIndex])
        self.m_menuItem_flashloaderResidentDtcm.SetItemLabel(uilang.kMainLanguageContentDict['mItem_flashloaderResidentDtcm'][langIndex])
        self.m_menuItem_flashloaderResidentOcram.SetItemLabel(uilang.kMainLanguageContentDict['mItem_flashloaderResidentOcram'][langIndex])
        self.m_menu_tools.SetLabel(self.m_menu_tools.FindItem(uilang.kMainLanguageContentDict['subMenu_efuseGroup'][lastIndex]), uilang.kMainLanguageContentDict['subMenu_efuseGroup'][langIndex])
        self.m_menubar.SetMenuLabel(uilang.kMenuPosition_Window, uilang.kMainLanguageContentDict['menu_window'][langIndex])
        self.m_menubar.SetMenuLabel(uilang.kMenuPosition_Help, uilang.kMainLanguageContentDict['menu_help'][langIndex])
        self.m_menuItem_homePage.SetItemLabel(uilang.kMainLanguageContentDict['mItem_homePage'][langIndex])
        self.m_menuItem_aboutAuthor.SetItemLabel(uilang.kMainLanguageContentDict['mItem_aboutAuthor'][langIndex])
        self.m_menuItem_contributors.SetItemLabel(uilang.kMainLanguageContentDict['mItem_contributors'][langIndex])
        self.m_menuItem_specialThanks.SetItemLabel(uilang.kMainLanguageContentDict['mItem_specialThanks'][langIndex])
        self.m_menuItem_revisionHistory.SetItemLabel(uilang.kMainLanguageContentDict['mItem_revisionHistory'][langIndex])

        self.m_notebook_targetSetup.SetPageText(0, uilang.kMainLanguageContentDict['panel_targetSetup'][langIndex])
        self.m_staticText_mcuSeries.SetLabel(uilang.kMainLanguageContentDict['sText_mcuSeries'][langIndex])
        self.m_staticText_mcuDevice.SetLabel(uilang.kMainLanguageContentDict['sText_mcuDevice'][langIndex])
        self.m_staticText_bootDevice.SetLabel(uilang.kMainLanguageContentDict['sText_bootDevice'][langIndex])
        self.m_button_bootDeviceConfiguration.SetLabel(uilang.kMainLanguageContentDict['button_bootDeviceConfiguration'][langIndex])
        self.m_button_deviceConfigurationData.SetLabel(uilang.kMainLanguageContentDict['button_deviceConfigurationData'][langIndex])

        self.m_notebook_portSetup.SetPageText(0, uilang.kMainLanguageContentDict['panel_portSetup'][langIndex])
        self.m_radioBtn_uart.SetLabel(uilang.kMainLanguageContentDict['radioBtn_uart'][langIndex])
        self.m_radioBtn_usbhid.SetLabel(uilang.kMainLanguageContentDict['radioBtn_usbhid'][langIndex])
        if self.hasDynamicLableBeenInit:
            if self.isUartPortSelected:
                self.m_staticText_portVid.SetLabel(uilang.kMainLanguageContentDict['sText_comPort'][langIndex])
                self.m_staticText_baudPid.SetLabel(uilang.kMainLanguageContentDict['sText_baudrate'][langIndex])
            elif self.isUsbhidPortSelected:
                self.m_staticText_portVid.SetLabel(uilang.kMainLanguageContentDict['sText_vid'][langIndex])
                self.m_staticText_baudPid.SetLabel(uilang.kMainLanguageContentDict['sText_pid'][langIndex])
            else:
                pass
        self.m_checkBox_oneStepConnect.SetLabel(uilang.kMainLanguageContentDict['checkBox_oneStepConnect'][langIndex])
        if self.connectStatusColor != None:
            self.updateConnectStatus(self.connectStatusColor)

        self.m_notebook_deviceStatus.SetPageText(0, uilang.kMainLanguageContentDict['panel_deviceStatus'][langIndex])

        self.m_staticText_secureBootType.SetLabel(uilang.kMainLanguageContentDict['sText_secureBootType'][langIndex])
        self.m_button_allInOneAction.SetLabel(uilang.kMainLanguageContentDict['button_allInOneAction'][langIndex])

        self.m_notebook_bootLog.SetPageText(0, uilang.kMainLanguageContentDict['panel_log'][langIndex])
        self.m_button_clearLog.SetLabel(uilang.kMainLanguageContentDict['button_clearLog'][langIndex])
        self.m_button_saveLog.SetLabel(uilang.kMainLanguageContentDict['button_SaveLog'][langIndex])
コード例 #30
0
ファイル: uicore.py プロジェクト: lgl88911/NXP-MCUBootUtility
    def __init__(self, parent):
        secBootWin.secBootWin.__init__(self, parent)
        self.m_bitmap_nxp.SetBitmap(wx.Bitmap( u"../img/logo_nxp.png", wx.BITMAP_TYPE_ANY ))

        self.exeBinRoot = os.getcwd()
        self.exeTopRoot = os.path.dirname(self.exeBinRoot)
        exeMainFile = os.path.join(self.exeTopRoot, 'src', 'main.py')
        if not os.path.isfile(exeMainFile):
            self.exeTopRoot = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
        uivar.setRuntimeSettings(None, self.exeTopRoot)
        uivar.initVar(os.path.join(self.exeTopRoot, 'bin', 'nsb_settings.json'))
        toolCommDict = uivar.getAdvancedSettings(uidef.kAdvancedSettings_Tool)
        self.toolCommDict = toolCommDict.copy()

        self.fuseSettingFilename = os.path.join(self.exeTopRoot, 'bin', 'fuse_settings.json')

        self.logFolder = os.path.join(self.exeTopRoot, 'gen', 'log_file')
        self.logFilename = os.path.join(self.exeTopRoot, 'gen', 'log_file', 'log.txt')

        self.connectStatusColor = None
        self.hasDynamicLableBeenInit = False

        self.languageIndex = 0
        self._initLanguage()
        self.setLanguage()

        self.isToolRunAsEntryMode = None
        self._initToolRunMode()
        self.setToolRunMode()

        self.isDymaticUsbDetection = None
        self._initUsbDetection()
        self.setUsbDetection()

        self.soundEffectType = None
        self._initSoundEffect()
        self.setSoundEffect()

        self.isSbFileEnabledToGen = None
        self._initGenSbFile()
        self.setGenSbFile()

        self.isAutomaticImageReadback = None
        self._initImageReadback()
        self.setImageReadback()

        self.flashloaderResident = None
        self._initFlashloaderResident()
        self.setFlashloaderResident()

        self.updateConnectStatus()

        self.mcuSeries = None
        self.mcuDevice = None
        self.bootDevice = None
        self.isMcuSeriesChanged = False
        self._initTargetSetupValue()
        self.setTargetSetupValue()

        self.efuseGroupSel = None
        self._initEfuseGroup()
        self.setEfuseGroup()

        self.isUartPortSelected = None
        self.isUsbhidPortSelected = None
        self.uartComPort = None
        self.uartBaudrate = None
        self.usbhidVid = None
        self.usbhidPid = None
        self.isUsbhidConnected = False
        self.usbhidToConnect = [None] * 2
        self._initPortSetupValue()

        self.soundEffectFilenameForTask = None

        self.isOneStepConnectMode = None
        self.initOneStepConnectMode()