public void AdjustDebugMethod(LoadedBSP.ConfiguredMCU mcu, ConfiguredDebugMethod method) { string iface; if (method.Method.ID == "xt-ocd") { if (method.Parameters.TryGetValue("com.sysprogs.esp8266.xt-ocd.debug_iface", out iface)) { ESP8266DebugConfigurator.DebugInterface ifaceObj = null; foreach (var obj in _Interfaces.Interfaces) { if (obj.ID == iface) { ifaceObj = obj; break; } } if (ifaceObj != null) { string templateFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "topology-template.xml"); XmlDocument doc = new XmlDocument(); doc.Load(templateFile); XmlElement el = doc.CreateElement("controller"); el.SetAttribute("id", "Controller0"); el.SetAttribute("module", ifaceObj.Module); foreach (var p in ifaceObj.Parameters) { string val; if (method.Parameters.TryGetValue(ESP8266DebugConfigurator.InterfaceSettingPrefix + p.UniqueID, out val) && !string.IsNullOrEmpty(val)) { el.SetAttribute(p.UniqueID, val); } } doc.DocumentElement.InsertBefore(el, doc.DocumentElement.FirstChild); string newFn = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"VisualGDB\xt-ocd-topology.xml"); doc.Save(newFn); method.Method.GDBServerArguments.Template = method.Method.GDBServerArguments.Template.Replace("$$com.sysprogs.esp8266.xt-ocd.configfile$$", "\"" + newFn + "\""); } } } else if (_ESP32Mode && method.Method.ID == "openocd") { if (!method.Parameters.ContainsKey("com.sysprogs.esp32.openocd.alg_timeout")) { method.Parameters["com.sysprogs.esp32.openocd.alg_timeout"] = "5000"; } } }
public void AdjustDebugMethod(LoadedBSP.ConfiguredMCU mcu, ConfiguredDebugMethod method) { string iface; if (method.Method.ID == "xt-ocd") { if (method.Parameters.TryGetValue("com.sysprogs.esp8266.xt-ocd.debug_iface", out iface)) { ESP8266DebugConfigurator.DebugInterface ifaceObj = null; foreach (var obj in _Interfaces.Interfaces) if (obj.ID == iface) { ifaceObj = obj; break; } if (ifaceObj != null) { string templateFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "topology-template.xml"); XmlDocument doc = new XmlDocument(); doc.Load(templateFile); XmlElement el = doc.CreateElement("controller"); el.SetAttribute("id", "Controller0"); el.SetAttribute("module", ifaceObj.Module); foreach (var p in ifaceObj.Parameters) { string val; if (method.Parameters.TryGetValue(ESP8266DebugConfigurator.InterfaceSettingPrefix + p.UniqueID, out val) && !string.IsNullOrEmpty(val)) el.SetAttribute(p.UniqueID, val); } doc.DocumentElement.InsertBefore(el, doc.DocumentElement.FirstChild); string newFn = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"VisualGDB\xt-ocd-topology.xml"); doc.Save(newFn); method.Method.GDBServerArguments.Template = method.Method.GDBServerArguments.Template.Replace("$$com.sysprogs.esp8266.xt-ocd.configfile$$", "\"" + newFn + "\""); } } } else if (_ESP32Mode && method.Method.ID == "openocd") { if (!method.Parameters.ContainsKey("com.sysprogs.esp32.openocd.alg_timeout")) method.Parameters["com.sysprogs.esp32.openocd.alg_timeout"] = "5000"; } }
public void AdjustDebugMethod(LoadedBSP.ConfiguredMCU mcu, ConfiguredDebugMethod method) { }
public void AdjustDebugMethod(LoadedBSP.ConfiguredMCU mcu, ConfiguredDebugMethod method) { }