Esempio n. 1
0
 public NordicSampleRelocator(ReverseConditionTable optionalConditionTableForFrameworkMapping)
     : base(optionalConditionTableForFrameworkMapping)
 {
     AutoDetectedFrameworks = new AutoDetectedFramework[0];
     AutoPathMappings       = new PathMapping[]
     {
         new PathMapping(@"\$\$SYS:VSAMPLE_DIR\$\$/(components|config|external|integration|modules)/(.*)", "$$SYS:BSP_ROOT$$/nRF5x/{1}/{2}"),
     };
 }
Esempio n. 2
0
            protected override VendorSampleRelocator CreateRelocator(ConstructedVendorSampleDirectory sampleDir)
            {
                ReverseConditionTable table = null;
                var conditionTableFile      = Path.Combine(BSPDirectory, ReverseFileConditionBuilder.ReverseConditionListFileName + ".gz");

                if (File.Exists(conditionTableFile))
                {
                    table = XmlTools.LoadObject <ReverseConditionTable>(conditionTableFile);
                }

                return(new STM32SampleRelocator(sampleDir, table));
            }
Esempio n. 3
0
            public STM32SampleRelocator(ConstructedVendorSampleDirectory dir, ReverseConditionTable optionalConditionTableForFrameworkMapping)
                : base(optionalConditionTableForFrameworkMapping)
            {
                _Directory = dir;

                /*
                 *  Known problems with trying to map frameworks:
                 *    HAL:
                 * Much longer build times
                 * LL-only samples don't provide cfg files for HAL
                 * HAL-only samples don't provide stm32_assert.h needed by LL
                 *    lwIP:
                 * Different SDKs have slightly different file layouts
                 * Some samples don't provide sys_xxx() functions
                 */

                AutoDetectedFrameworks = new AutoDetectedFramework[]
                {/*
                  * new AutoDetectedFramework {FrameworkID = "com.sysprogs.arm.stm32.hal",
                  *     FileRegex = new Regex(@"\$\$SYS:VSAMPLE_DIR\$\$/[^/\\]+/Drivers/[^/\\]+_HAL_Driver", RegexOptions.Compiled | RegexOptions.IgnoreCase),
                  *     DisableTriggerRegex = new Regex(@"_ll_[^/\\]+\.c", RegexOptions.Compiled | RegexOptions.IgnoreCase),
                  *     Configuration = new Dictionary<string, string>() }
                  */
                 /*new AutoDetectedFramework {FrameworkID = "com.sysprogs.arm.stm32.LwIP",
                  *  FileRegex = new Regex(@"\$\$SYS:VSAMPLE_DIR\$\$/[^/\\]+/Middlewares/Third_Party/LwIP", RegexOptions.Compiled | RegexOptions.IgnoreCase),
                  *  DisableTriggerRegex = new Regex(@"^$", RegexOptions.Compiled | RegexOptions.IgnoreCase),
                  *  Configuration = new Dictionary<string, string>() }*/
                };

                AutoPathMappings = new PathMapping[]
                {
                    new PathMapping(@"\$\$SYS:VSAMPLE_DIR\$\$/([^_]+)/Drivers/STM32[^/\\]+xx_HAL_Driver/(.*)", "$$SYS:BSP_ROOT$$/STM32{1}xxxx/STM32{1}xx_HAL_Driver/{2}"),
                    new PathMapping(@"\$\$SYS:VSAMPLE_DIR\$\$/([^_]+)/Drivers/CMSIS/DSP/(.*)", "$$SYS:BSP_ROOT$$/STM32{1}xxxx/DSP/{2}"),
                    new PathMapping(@"\$\$SYS:VSAMPLE_DIR\$\$/([^_]+)/Drivers/CMSIS/(.*)", "$$SYS:BSP_ROOT$$/STM32{1}xxxx/CMSIS_HAL/{2}"),

                    new PathMapping(@"\$\$SYS:VSAMPLE_DIR\$\$/([^_]+)/Middlewares/ST/STM32_USB_(Host|Device)_Library/(.*)", "$$SYS:BSP_ROOT$$/STM32{1}xxxx/STM32_USB_{2}_Library/{3}"),
                    new PathMapping(@"\$\$SYS:VSAMPLE_DIR\$\$/([^_]+)/Middlewares/Third_Party/(FreeRTOS)/(.*)", "$$SYS:BSP_ROOT$$/{2}/{3}"),

                    new PathMapping(@"\$\$SYS:VSAMPLE_DIR\$\$/WB/Middlewares/ST/STM32_WPAN(.*)", "$$SYS:BSP_ROOT$$/STM32WBxxxx/STM32_WPAN{1}"),
                    new PathMapping(@"\$\$SYS:VSAMPLE_DIR\$\$/(WB)/Drivers/BSP/(.*)", "$$SYS:BSP_ROOT$$/STM32{1}xxxx/BSP/{2}"),
                    new PathMapping(@"\$\$SYS:VSAMPLE_DIR\$\$/MP1/Middlewares/Third_Party/OpenAMP/(.*)", "$$SYS:BSP_ROOT$$/OpenAMP/{1}"),
                };
            }
Esempio n. 4
0
            protected override VendorSampleRelocator CreateRelocator(ConstructedVendorSampleDirectory sampleDir)
            {
                ReverseConditionTable table = null;

                if (false)
                {
                    //As of SDK 16.0, most vendor samples include very specific subsets of various frameworks, so
                    //converting them to properly reference embedded frameworks pulls in too many extra files.
                    //Also the LwIP framework defines excessive amount of include directories, exceeding the 32KB
                    //limit for .rsp files.
                    var conditionTableFile = Path.Combine(BSPDirectory, ReverseFileConditionBuilder.ReverseConditionListFileName + ".gz");
                    if (File.Exists(conditionTableFile))
                    {
                        table = XmlTools.LoadObject <ReverseConditionTable>(conditionTableFile);
                    }
                }

                return(new NordicSampleRelocator(table));
            }
Esempio n. 5
0
 public ConstructedConfiguration(ReverseConditionTable table)
 {
     _Table = table;
 }
Esempio n. 6
0
 public ConfigurationFixDatabaseBuilder(LoadedBSP bsp, string testDirectory, ReverseConditionTable reverseConditionTable)
 {
     _BSP                   = bsp;
     _TestDirectory         = testDirectory;
     _ReverseConditionTable = reverseConditionTable;
 }