Beispiel #1
0
        protected override void InsertResetAndHaltCommands(int idxLoad, QuickSetupDatabase.ProgrammingInterface iface, QuickSetupDatabase.TargetDeviceFamily device)
        {
            const string unprotectCommand = "mon flash protect 0 64 last off";
            const string resetHalt        = "mon reset halt";
            const string restartAtEntry   = "mon reset halt"; // set $pc = _start";
            int          idx;

            idx = Settings.StartupCommands.IndexOf(unprotectCommand);
            if (idx == -1)
            {
                Settings.StartupCommands.Insert(idxLoad, unprotectCommand);
            }

            idx = Settings.StartupCommands.IndexOf(resetHalt);
            if (idx == -1)
            {
                Settings.StartupCommands.Insert(idxLoad, resetHalt);
            }

            idx = Settings.StartupCommands.IndexOf(restartAtEntry, idxLoad + 1);
            if (idx == -1)
            {
                Settings.StartupCommands.Add(restartAtEntry);
            }
        }
Beispiel #2
0
 private void SetSelectedDevice(QuickSetupDatabase.ProgrammingInterface iface)
 {
     if (iface != null)
     {
         for (int i = 0; i < cbQuickInterface.Items.Count; i++)
         {
             var thisIface = cbQuickInterface.Items[i] as QuickSetupDatabase.ProgrammingInterface;
             if (thisIface != null && thisIface.ID == iface.ID)
             {
                 cbQuickInterface.SelectedIndex = i;
                 break;
             }
         }
     }
 }
Beispiel #3
0
        protected override void InsertResetAndHaltCommands(int idxLoad, QuickSetupDatabase.ProgrammingInterface iface, QuickSetupDatabase.TargetDeviceFamily device)
        {
/*            int idxHalt = Settings.StartupCommands.IndexOf("mon reset halt");
 *          if (idxHalt == -1)
 *              Settings.StartupCommands.Insert(idxLoad, "mon reset halt");*/
        }