public void SetConfiguration(object configuration, KnownInterfaceInstance context) { var settings = configuration as TiXDSDebugSettings ?? new TiXDSDebugSettings(); DataContext = _Editor = new TiXDSSettingsEditor(settings); _Editor.PropertyChanged += _Editor_PropertyChanged; }
public ESPxxGDBStubSettingsEditor(ESPxxGDBStubSettingsBase settings, KnownInterfaceInstance context, IBSPConfiguratorHost host, bool esp32Mode) { _Context = context; _Host = host; IsESP32 = esp32Mode; Settings = settings; if (Settings == null) { if (esp32Mode) { Settings = new ESP32GDBStubSettings(); } else { Settings = new ESP8266GDBStubSettings(); } } if (context.COMPortNumber.HasValue) { Settings.COMPort = "COM" + context.COMPortNumber; COMPortSelectorVisibility = Visibility.Collapsed; } if (Settings.FLASHResources != null) { foreach (var r in Settings.FLASHResources) { FLASHResources.Add(r); } } FLASHResources.CollectionChanged += (s, e) => { Settings.FLASHResources = FLASHResources.ToArray(); OnSettingsChanged(); }; }
public void SetConfiguration(object configuration, KnownInterfaceInstance context) { var settings = configuration as RISCVOpenOCDSettings; _Editor = new RISCVOpenOCDSettingsEditor(_Host, _Method, settings, _Controller, context); _Editor.PropertyChanged += (s, e) => SettingsChanged?.Invoke(this, EventArgs.Empty); DataContext = _Editor; }
public void SetConfiguration(object configuration, KnownInterfaceInstance context) { var settings = (configuration as RedLinkDebugSettings) ?? new RedLinkDebugSettings(); CommandLine = settings.CommandLineArguments; ProgramMode = settings.ProgramMode; AlwaysPassSerialNumber = settings.AlwaysUseProbeSerialNumber; StartupCommands = string.Join("\r\n", settings.StartupCommands ?? new string[0]); _Settings = settings; }
public void SetConfiguration(object configuration, KnownInterfaceInstance context) { ESPxxOpenOCDSettings settings; if (_IsESP32) { settings = configuration as ESP32OpenOCDSettings; } else { settings = configuration as ESP8266OpenOCDSettings; } _Editor = new ESPxxOpenOCDSettingsEditor(_Host, _Method.Directory, settings, context, _IsESP32, _Controller); _Editor.PropertyChanged += (s, e) => SettingsChanged?.Invoke(this, EventArgs.Empty); DataContext = _Editor; }
public ESPxxGDBStubSettingsEditor(ESPxxGDBStubSettingsBase settings, KnownInterfaceInstance context, IBSPConfiguratorHost host, bool esp32Mode) { _Context = context; _Host = host; IsESP32 = esp32Mode; Settings = settings; if (Settings == null) { if (esp32Mode) { Settings = new ESP32GDBStubSettings(); } else { Settings = new ESP8266GDBStubSettings(); } } if (context.COMPortNumber.HasValue) { Settings.COMPort = "COM" + context.COMPortNumber; COMPortSelectorVisibility = Visibility.Collapsed; } else if (host.AdvancedModeContext is IExternallyProgrammableProjectDebugContext ectx) { ExternalCOMPortSelectionHint = ectx.ExternalProgrammingOptionHint; if (ExternalCOMPortSelectionHint != null) { COMPortSelectorVisibility = DirectFLASHProgrammingOptionVisibility = Visibility.Collapsed; } } if (Settings.FLASHResources != null) { foreach (var r in Settings.FLASHResources) { FLASHResources.Add(r); } } FLASHResources.CollectionChanged += (s, e) => { Settings.FLASHResources = FLASHResources.ToArray(); OnSettingsChanged(); }; }
public RISCVOpenOCDSettingsEditor(IBSPConfiguratorHost host, string baseDir, RISCVOpenOCDSettings settings, KnownInterfaceInstance context) : base(host, baseDir, settings ?? new RISCVOpenOCDSettings(), context, settings == null) { }
public void SetConfiguration(object configuration, KnownInterfaceInstance context) { DataContext = _Editor = new ESPxxGDBStubSettingsEditor(configuration as ESPxxGDBStubSettingsBase, context, _Host, false); _Editor.SettingsChanged += (s, e) => SettingsChanged?.Invoke(s, e); }
public ESPxxOpenOCDSettingsEditor(IBSPConfiguratorHost host, string baseDir, ESPxxOpenOCDSettings settings, KnownInterfaceInstance context, bool isESP32) : base(host, baseDir, settings ?? (isESP32 ? (OpenOCDSettings) new ESP32OpenOCDSettings() : new ESP8266OpenOCDSettings()), context) { IsESP32 = isESP32; _ESPIDFMode = host.MCU.Configuration.ContainsKey("com.sysprogs.esp32.idf.sdkconfig"); Device.SelectedItem = new ScriptSelector <QuickSetupDatabase.TargetDeviceFamily> .Item { Script = isESP32 ? "target/esp32.cfg" : "target/esp8266.cfg" }; if (settings == null) { ExplicitFrequencyEnabled = true; if (!isESP32) { AutofeedWatchdog = true; NoInterruptsDuringSteps = true; } } var loadCommand = ProvideLoadCommand(); var idx = Settings.StartupCommands.IndexOf("mon reset halt"); if (idx < 0 || idx > loadCommand) { Settings.StartupCommands.Insert(loadCommand, "mon reset halt"); } if (Settings.SuggestionLogicRevision < SuggestionLogicRevision) { if (isESP32 && Settings.StartupCommands.IndexOf(BreakpointFixCommand) == -1) { Settings.SuggestionLogicRevision = SuggestionLogicRevision; for (int i = 0; i < Settings.StartupCommands.Count; i++) { if (Settings.StartupCommands[i].StartsWith("target ")) { Settings.StartupCommands.Insert(i + 1, BreakpointFixCommand); break; } } } } if (Settings.FLASHResources != null) { foreach (var r in Settings.FLASHResources) { FLASHResources.Add(r); } } FLASHResources.CollectionChanged += (s, e) => { Settings.FLASHResources = FLASHResources.ToArray(); OnPropertyChanged(nameof(FLASHResources)); }; }
public ESPxxOpenOCDSettingsEditor(IBSPConfiguratorHost host, string baseDir, ESPxxOpenOCDSettings settings, KnownInterfaceInstance context, bool isESP32) : base(host, baseDir, settings ?? (isESP32 ? (OpenOCDSettings) new ESP32OpenOCDSettings() : new ESP8266OpenOCDSettings()), context) { IsESP32 = isESP32; Device.SelectedItem = new ScriptSelector <QuickSetupDatabase.TargetDeviceFamily> .Item { Script = isESP32 ? "target/esp32.cfg" : "target/esp8266.cfg" }; if (settings == null) { ExplicitFrequencyEnabled = true; if (!isESP32) { AutofeedWatchdog = true; NoInterruptsDuringSteps = true; } } var loadCommand = ProvideLoadCommand(); var idx = Settings.StartupCommands.IndexOf("mon reset halt"); if (idx < 0 || idx > loadCommand) { Settings.StartupCommands.Insert(loadCommand, "mon reset halt"); } if (Settings.FLASHResources != null) { foreach (var r in Settings.FLASHResources) { FLASHResources.Add(r); } } FLASHResources.CollectionChanged += (s, e) => { Settings.FLASHResources = FLASHResources.ToArray(); OnPropertyChanged(nameof(FLASHResources)); }; }
public RISCVOpenOCDSettingsEditor(IBSPConfiguratorHost host, LoadedBSP.LoadedDebugMethod method, RISCVOpenOCDSettings settings, RISCVOpenOCDDebugController controller, KnownInterfaceInstance context) : base(host, method.Directory, settings, context, controller, settings == null) { }