SeTLPC2478DefaultOptions() public method

public SeTLPC2478DefaultOptions ( ) : void
return void
        private void CreateLinkTarget(Link link, IList<LogQueueItem> messages)
        {
            Target target = new Target();
            //Установка опций по умолчанию
            target.SeTLPC2478DefaultOptions();

            target.Name = Path.GetFileNameWithoutExtension(link.Name);

            target.Options.GenApp = TWO_STATE_BOOL.ENABLED;
            target.Options.GenLib = TWO_STATE_BOOL.DISABLED;

            target.Options.ADSFLGA = "226,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";

            //target.Options.OCR_RVCT = "1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,8,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,1,0,0,0,0,224,127,0,64,0,0";
            target.Options.ADSCCFLG.ARM_Thumb_Interworking = uVision.Project.THREE_STATE_BOOL.DISABLED;
            target.Options.ADSASFLG = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
            
            target.Options.ADSLDFG = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";

            target.Options.ADSLDTA = "";
            target.Options.ADSLDDA = "";
            target.Options.Debug = "1";
            target.Options.Browse = "1";


            //Исключаем все файлы из построения
            foreach (PKStudio.uVision.Project.File f in uVisionProject.FileList.Values)
            {
                //if ((f.Type == uVision.Project.File.FILE_TYPE.C_FILE) || (f.Type == uVision.Project.File.FILE_TYPE.CPP_FILE) || (f.Type == uVision.Project.File.FILE_TYPE.ASM_FILE))
                //{
                PKStudio.uVision.Project.FileOptions fileopt = new uVision.Project.FileOptions(f);
                fileopt.IncBld = THREE_STATE_BOOL.DISABLED;
                target.FilesOpton.Add(fileopt);
                //}
            }

            target.Options.OutDir = Path.GetDirectoryName(link.OutputFileMSBuild) + "\\";
            target.Options.OutName = Path.GetFileNameWithoutExtension(link.OutputFileMSBuild);
            link.OutputFileuVision = link.OutputFileMSBuild;

            foreach (RequiredObject obj in link.InputObjects.Values)
            {
                this.AddCompileFile(obj, target);
            }


            foreach (RequiredLibrary lib in link.InputLibraries.Values)
            {
                PKStudio.uVision.Project.FileOptions fileOpt = target.FindFileOptions(lib.OutputFileuVision);
                fileOpt.IncBld = THREE_STATE_BOOL.ENABLED;
            }

            //string LinkString = ARMLINKPath;

            foreach (ArgCollection arg in link.ParamCollection.Values)
            {
                if (arg.Tag == "options")
                {
                    switch (arg.Name)
                    {
                        //Ничего не надо записывать, так ккак все пути будут содержаться в файл листе
                        case "--userlibpath":
                            break;
                        case "--scatter":
                            target.Options.ADSLDSC = arg[0];
                            break;
                        case "--device":
                            break;
                        default:
                            if (arg.Count > 0)
                            {
                                foreach (string s in arg)
                                {
                                    //LinkString += " " + arg.Name + " " + s;
                                    target.Options.ADSLDMC.Add(arg.Name + " " + s);
                                }
                            }
                            //else LinkString += " " + arg.Name;
                            else target.Options.ADSLDMC.Add(arg.Name);
                            break;
                    }
                }
            }

            //foreach (BuildBase bb in link.AllInputs.Values)
            //{
            //    LinkString += " " + bb.OutputFileuVision;
            //}

            //target.AfterBuild.Add(LinkString);


            //Добавляем fromelf
            foreach (LogQueueItem item in messages)
            {
                if (item.Message.ToLower().Contains(ARMFROMELFPath))
                {
                    target.AfterBuild.Add(item.Message);
                }
            }

            target.Num = uVisionProject.TargetList.Count + 1;
            uVisionProject.TargetList.Add(target.Num, target);

            if (target.BeforeBuild.Count > 0)
            {
                target.Options.BrunUsr_0.Run = TWO_STATE_BOOL.ENABLED;
                target.Options.BrunUsr_0.Command = ".\\BatFiles\\Prebuild" + @"\" + target.Name + ".bat";
            }

            if (target.AfterBuild.Count > 0)
            {
                target.Options.RunUsr_0.Run = TWO_STATE_BOOL.ENABLED;
                target.Options.RunUsr_0.Command = ".\\BatFiles\\Postbuild" + @"\" + target.Name + ".bat";
            }

        }
        private void CreateObjectTartet(RequiredObject obj)
        {
            Target target = new Target();
            //Установка опций по умолчанию
            target.SeTLPC2478DefaultOptions();

            target.Name = Path.GetFileNameWithoutExtension(obj.Name);
            target.Options.OutDir += uVisionTargetsPath + "\\" + target.Name + "\\";
            target.Options.OutName = Path.GetFileNameWithoutExtension(obj.Name);

            target.Options.GenApp = TWO_STATE_BOOL.DISABLED;
            target.Options.GenLib = TWO_STATE_BOOL.ENABLED;

            target.Options.ADSFLGA = "226,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";

            target.Options.ADSCCFLG.ARM_Thumb_Interworking = uVision.Project.THREE_STATE_BOOL.DISABLED;
            target.Options.ADSASFLG = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";

            target.Options.Debug = "1";
            target.Options.Browse = "1";

            //Исключаем все файлы из построения
            foreach (PKStudio.uVision.Project.File f in uVisionProject.FileList.Values)
            {
                PKStudio.uVision.Project.FileOptions fileopt = new uVision.Project.FileOptions(f);
                fileopt.IncBld = THREE_STATE_BOOL.DISABLED;
                target.FilesOpton.Add(fileopt);
            }

            this.AddCompileFile(obj, target);


            target.Num = uVisionProject.TargetList.Count + 1;
            uVisionProject.TargetList.Add(target.Num, target);

            if (target.BeforeBuild.Count > 0)
            {
                target.Options.BrunUsr_0.Run = TWO_STATE_BOOL.ENABLED;
                target.Options.BrunUsr_0.Command = ".\\BatFiles\\Prebuild" + @"\" + target.Name + ".bat";
            }

            if (target.AfterBuild.Count > 0)
            {
                target.Options.RunUsr_0.Run = TWO_STATE_BOOL.ENABLED;
                target.Options.RunUsr_0.Command = ".\\BatFiles\\Postbuild" + @"\" + target.Name + ".bat";
            }
        }