Encapsulates EcuRefs for an entire ecu Contains methods to import/export EcuRefs TODO: Refactor code from EcuMapTool into this TODO: Populate definiitions with this imported data
コード例 #1
0
ファイル: EcuMapTool.cs プロジェクト: Merp/SharpTune
 public EcuMapTool(AvailableDevices ad)
 {
     availableDevices = ad;
     Defines = new Dictionary<string, List<EcuLoc>>();
     Sections = new Dictionary<KeyValuePair<string,List<string>>, List<string>>();
     ecuMap = new EcuMap();
 }
コード例 #2
0
ファイル: EcuMapTool.cs プロジェクト: maraudingeats/SharpTune
 public EcuMapTool(AvailableDevices ad)
 {
     availableDevices = ad;
     Defines          = new Dictionary <string, List <EcuLoc> >();
     Sections         = new Dictionary <KeyValuePair <string, List <string> >, List <string> >();
     ecuMap           = new EcuMap();
 }
コード例 #3
0
ファイル: EcuMapTool.cs プロジェクト: maraudingeats/SharpTune
        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");
                }
            }
        }
コード例 #4
0
        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");
                }
            }
        }
コード例 #5
0
ファイル: ModDefinition.cs プロジェクト: nosajton/SharpTune
 public void DefineRRLogEcuFromMap(string mapFile, string ident)
 {
     EcuMap im = new EcuMap();
     im.ImportFromMapFileOrText(mapFile);
     DefineRRLogEcu(im.Locs, ident);
 }
コード例 #6
0
ファイル: EcuMapTool.cs プロジェクト: Merp/SharpTune
        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");
            }
        }
コード例 #7
0
ファイル: ECUMetaData.cs プロジェクト: nosajton/SharpTune
 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;
     //        }
     //    }
     //}
 }
コード例 #8
0
ファイル: ECUMetaData.cs プロジェクト: nosajton/SharpTune
 public void ImportMapText(string text, ECU image)
 {
     EcuMap im = new EcuMap();
     im.ImportFromMapFileOrText(text);
     ReadMap(im,image);
 }
コード例 #9
0
ファイル: ECUMetaData.cs プロジェクト: nosajton/SharpTune
 public void ImportMapFile(string filepath, ECU image)
 {
     EcuMap im = new EcuMap();
     im.ImportFromMapFileOrText(filepath);
     ReadMap(im,image);
 }
コード例 #10
0
 public EcuMapTool()
 {
     Defines  = new Dictionary <string, List <EcuLoc> >();
     Sections = new Dictionary <KeyValuePair <string, List <string> >, List <string> >();
     ecuMap   = new EcuMap();
 }