public EcuMapTool(AvailableDevices ad) { availableDevices = ad; Defines = new Dictionary<string, List<EcuLoc>>(); Sections = new Dictionary<KeyValuePair<string,List<string>>, List<string>>(); ecuMap = new EcuMap(); }
public EcuMapTool(AvailableDevices ad) { availableDevices = ad; Defines = new Dictionary <string, List <EcuLoc> >(); Sections = new Dictionary <KeyValuePair <string, List <string> >, List <string> >(); ecuMap = new EcuMap(); }
public void UpdateTargetHeader(string xmlFileName, string mapFileName, string headerFileName, string linkerScriptFileName, string romCalId, string buildConfig, string ver) { Trace.WriteLine("Begin updating target header"); String Build; String Config = buildConfig.Split('_')[0]; if (buildConfig.Split('_').Length > 1) { Build = buildConfig.Split('_')[1]; } else { Build = "Debug"; } LoadXML(xmlFileName); ecuMap = new EcuMap(); if (ecuMap.ImportFromHeaderAndMapFile(mapFileName, headerFileName)) { ECUMetaData def; if (availableDevices.DefDictionary.ContainsKey(romCalId)) { def = availableDevices.DefDictionary[romCalId]; } else { Trace.WriteLine("Error, rom calid not found!!"); return; } FindAndWriteDefines(headerFileName, Build, Config, def.calibrationlId, def.EcuId, ver); FindAndWriteSections(linkerScriptFileName); Trace.WriteLine("Target header update success!!"); } else { for (int i = 0; i < 10; i++) { Trace.WriteLine("Target header update FAILURE!!! Missing map AND header files!!! Check CALID Placeholder"); } } }
public void UpdateTargetHeader(string xmlFileName, string mapFileName, string headerFileName, string linkerScriptFileName, string romCalId, string buildConfig) { Trace.WriteLine("Begin updating target header"); String Build; String Config = buildConfig.Split('_')[0]; if (buildConfig.Split('_').Length > 1) { Build = buildConfig.Split('_')[1]; } else { Build = "Debug"; } LoadXML(xmlFileName); ecuMap = new EcuMap(); if (ecuMap.ImportFromHeaderAndMapFile(mapFileName, headerFileName)) { Definition def; if (SharpTuner.AvailableDevices.DefDictionary.ContainsKey(romCalId)) { def = SharpTuner.AvailableDevices.DefDictionary[romCalId]; } else { Trace.WriteLine("Error, rom calid not found!!"); return; } FindAndWriteDefines(headerFileName, Build, Config, def.CarInfo["internalidstring"].ToString(), def.CarInfo["ecuid"].ToString()); Trace.WriteLine("Target header update success!!"); } else { for (int i = 0; i < 10; i++) { Trace.WriteLine("Target header update FAILURE!!! Missing map AND header files!!! Check CALID Placeholder"); } } }
public void DefineRRLogEcuFromMap(string mapFile, string ident) { EcuMap im = new EcuMap(); im.ImportFromMapFileOrText(mapFile); DefineRRLogEcu(im.Locs, ident); }
public void UpdateTargetHeader(string xmlFileName, string mapFileName, string headerFileName, string linkerScriptFileName, string romCalId, string buildConfig, string ver) { Trace.WriteLine("Begin updating target header"); String Build; String Config = buildConfig.Split('_')[0]; if (buildConfig.Split('_').Length > 1) Build = buildConfig.Split('_')[1]; else Build = "Debug"; LoadXML(xmlFileName); ecuMap = new EcuMap(); if (ecuMap.ImportFromHeaderAndMapFile(mapFileName, headerFileName)) { ECUMetaData def; if (availableDevices.DefDictionary.ContainsKey(romCalId)) def = availableDevices.DefDictionary[romCalId]; else { Trace.WriteLine("Error, rom calid not found!!"); return; } FindAndWriteDefines(headerFileName, Build, Config, def.calibrationlId, def.EcuId, ver); FindAndWriteSections(linkerScriptFileName); Trace.WriteLine("Target header update success!!"); } else { for (int i = 0; i < 10; i++) Trace.WriteLine("Target header update FAILURE!!! Missing map AND header files!!! Check CALID Placeholder"); } }
public void ReadMap(EcuMap idaMap,ECU image) { //loop through base def and search for table names in map foreach (var romtable in AggregateBaseRomTables) { foreach (var idan in idaMap.CleanLocs) { if (romtable.Key.EqualsDefineString(idan.Key)) { ExposeTable(romtable.Key, LookupTableFactory.CreateLookupTable(romtable.Key, uint.Parse(idan.Value.ToString(), NumberStyles.AllowHexSpecifier), image.imageStream)); break; } } } ////TODO RAMTABLES //foreach (var ramtable in baseDef.RamTableList) //{ // foreach (var idan in idaMap.IdaCleanNames) // { // if (ramtable.Key.EqualsIdaString(idan.Key)) // { // break; // } // } //} }
public void ImportMapText(string text, ECU image) { EcuMap im = new EcuMap(); im.ImportFromMapFileOrText(text); ReadMap(im,image); }
public void ImportMapFile(string filepath, ECU image) { EcuMap im = new EcuMap(); im.ImportFromMapFileOrText(filepath); ReadMap(im,image); }
public EcuMapTool() { Defines = new Dictionary <string, List <EcuLoc> >(); Sections = new Dictionary <KeyValuePair <string, List <string> >, List <string> >(); ecuMap = new EcuMap(); }