Exemplo n.º 1
0
 public GccToolChain(ToolchainSettings settings)
     : base(settings)
 {
 }
Exemplo n.º 2
0
        static int RunBuild(BuildOptions options)
        {
            var solution = LoadSolution(options);
            var project = FindProject(solution, options.Project);

            var gccSettings = new ToolchainSettings();
            gccSettings.ToolChainLocation = @"c:\vestudio\appdata\repos\GCCToolchain\bin";
            gccSettings.IncludePaths.Add("arm-none-eabi\\include\\c++\\4.9.3");
            gccSettings.IncludePaths.Add("arm-none-eabi\\include\\c++\\4.9.3\\arm-none-eabi\\thumb");
            gccSettings.IncludePaths.Add("lib\\gcc\\arm-none-eabi\\4.9.3\\include");

            var toolchain = new GccToolChain(gccSettings);

            toolchain.Jobs = options.Jobs;
            var console = new ProgramConsole();

            if (project != null)
            {
                var stopWatch = new System.Diagnostics.Stopwatch();
                stopWatch.Start();

                try {
                    project.ResolveReferences(console);
                }
                catch (Exception e)
                {
                    console.WriteLine(e.Message);
                }

                var awaiter = toolchain.Build(console, project);
                awaiter.Wait();

                stopWatch.Stop();
                console.WriteLine(stopWatch.Elapsed.ToString());
            }
            else
            {
                console.WriteLine("Nothing to build.");
            }

            return 1;
        }
Exemplo n.º 3
0
        static int RunClean(CleanOptions options)
        {
            var solution = LoadSolution(options);

            var gccSettings = new ToolchainSettings();
            gccSettings.ToolChainLocation = @"c:\vestudio\appdata\repos\GCCToolchain\bin";
            gccSettings.IncludePaths.Add("arm-none-eabi\\include\\c++\\4.9.3");
            gccSettings.IncludePaths.Add("arm-none-eabi\\include\\c++\\4.9.3\\arm-none-eabi\\thumb");
            gccSettings.IncludePaths.Add("lib\\gcc\\arm-none-eabi\\4.9.3\\include");

            var toolchain = new GccToolChain(gccSettings);

            var console = new ProgramConsole();

            var project = FindProject(solution, options.Project);

            if (project != null)
            {
                toolchain.Clean(console, project).Wait();
            }
            else
            {
                console.WriteLine("Nothing to clean.");
            }

            return 1;
        }
Exemplo n.º 4
0
 public StandardToolChain(ToolchainSettings settings)
 {
     this.Settings = settings;
     this.Jobs = 1;
 }