Przeglądaj źródła

CoreValidation: Fixed DS-MDK projects and added build script.

Jonatan Antoni 8 lat temu
rodzic
commit
bc54e9b943

+ 9 - 7
CMSIS/CoreValidation/Examples/DS-MDK/Cortex-A5/GCC/.cproject

@@ -7,16 +7,14 @@
 				<extensions>
 					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
 					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
 					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 				</extensions>
 			</storageModule>
 			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
 				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1902326704" name="Debug" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug" prebuildStep="${cross_prefix}${cross_c}${cross_suffix} -x c -D_RTE_ -DARMCA5 -I../RTE/Device/ARMCA5 -E ../RTE/Device/ARMCA5/ARMCA5.ld -P -o ${OUTPUT_PREFIX}ARMCA5.ld">
 					<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1902326704." name="/" resourcePath="">
-						<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.1542471532" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug">
+						<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.1542471532" name="Cross ARM GCC" nonInternalBuilderId="ilg.gnuarmeclipse.managedbuild.cross.builder" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug">
 							<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.385657698" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.none" valueType="enumerated"/>
 							<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.409753934" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
 							<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.2085737125" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="true" valueType="boolean"/>
@@ -47,7 +45,7 @@
 							<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pedantic.1200816663" name="Pedantic (-pedantic)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pedantic" value="true" valueType="boolean"/>
 							<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow.1850365328" name="Warn if shadowed variable (-Wshadow)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow" value="true" valueType="boolean"/>
 							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1543504186" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
-							<builder buildPath="${workspace_loc:/CMSIS_CV_GCC}/Debug" id="ilg.gnuarmeclipse.managedbuild.cross.builder.898430072" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
+							<builder autoBuildTarget="all" buildPath="${workspace_loc:/CMSIS_CV_CA5_GCC}/Debug" cleanBuildTarget="clean" command="${cross_make}" id="org.eclipse.cdt.build.core.internal.builder.1679269105" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="org.eclipse.cdt.build.core.internal.builder"/>
 							<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1600916900" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
 								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.1441454386" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
 								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.339175206" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" valueType="definedSymbols">
@@ -101,9 +99,9 @@
 								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano.545020941" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano" value="true" valueType="boolean"/>
 								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other.132873437" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other" value="--specs=rdimon.specs" valueType="string"/>
 								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile.2065531619" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile" valueType="stringList">
-									<listOptionValue builtIn="false" value="ARMCA5.ld"/>
+									<listOptionValue builtIn="false" value="&quot;ARMCA5.ld&quot;"/>
 								</option>
-								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.libs.32028998" name="Libraries (-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.libs" valueType="libs"/>
+								<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.libs.32028998" name="Libraries (-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.libs"/>
 								<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input.1531565301" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input">
 									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
 									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
@@ -168,5 +166,9 @@
 			<file name="RTE/Device/ARMCA9/mmu_ARMCA9.c" version="1.0.0"/>
 		</files>
 	</storageModule>
-	<storageModule moduleId="refreshScope"/>
+	<storageModule moduleId="refreshScope" versionNumber="2">
+		<configuration configurationName="Debug">
+			<resource resourceType="PROJECT" workspacePath="/CMSIS_CV_CA5_GCC"/>
+		</configuration>
+	</storageModule>
 </cproject>

+ 1 - 1
CMSIS/CoreValidation/Examples/DS-MDK/Cortex-A5/GCC/RTE/CMSIS_CORE_Validation/CV_Config.h

@@ -16,7 +16,7 @@
 // <o> Print Output Format <0=> Plain Text <1=> XML
 // <i> Set the test results output format to plain text or XML
 #ifndef PRINT_XML_REPORT
-#define PRINT_XML_REPORT            0
+#define PRINT_XML_REPORT            1
 #endif
 // <o> Buffer size for assertions results
 // <i> Set the buffer size for assertions results buffer

+ 2 - 2
CMSIS/CoreValidation/Examples/DS-MDK/Cortex-A7/AC5/.cproject

@@ -20,8 +20,8 @@
 							<targetPlatform id="com.arm.toolchain.baremetal.base.var.arm_compiler_5-5.1960502218.788792350" name=""/>
 							<builder buildPath="${workspace_loc:/CMSIS_CV}/Debug" id="org.eclipse.cdt.build.core.internal.builder.1105228045" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="org.eclipse.cdt.build.core.internal.builder"/>
 							<tool id="com.arm.tool.c.compiler.base.var.arm_compiler_5-5.1006008870" name="ARM C Compiler 5" superClass="com.arm.tool.c.compiler.base.var.arm_compiler_5-5">
-								<option id="com.arm.tool.c.compiler.option.incpath.2039211042" name="Include path (-I)" superClass="com.arm.tool.c.compiler.option.incpath" useByScannerDiscovery="false" valueType="includePath"/>
-								<option id="com.arm.tool.c.compiler.option.defmac.1773701319" name="Define macro (-D)" superClass="com.arm.tool.c.compiler.option.defmac" useByScannerDiscovery="false" valueType="definedSymbols"/>
+								<option id="com.arm.tool.c.compiler.option.incpath.2039211042" name="Include path (-I)" superClass="com.arm.tool.c.compiler.option.incpath" useByScannerDiscovery="false"/>
+								<option id="com.arm.tool.c.compiler.option.defmac.1773701319" name="Define macro (-D)" superClass="com.arm.tool.c.compiler.option.defmac" useByScannerDiscovery="false"/>
 								<option defaultValue="com.arm.tool.c.compiler.option.optlevel.min" id="com.arm.tool.c.compiler.option.optlevel.882659687" name="Optimization level" superClass="com.arm.tool.c.compiler.option.optlevel" useByScannerDiscovery="true" valueType="enumerated"/>
 								<option id="com.arm.tool.c.compiler.option.targetcpu.1426497902" name="Target CPU (--cpu)" superClass="com.arm.tool.c.compiler.option.targetcpu" useByScannerDiscovery="true" value="Cortex-A7" valueType="string"/>
 								<option id="com.arm.tool.c.compiler.option.fppcs.1692296380" name="Floating-point PCS (--apcs)" superClass="com.arm.tool.c.compiler.option.fppcs" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.option.fppcs.hard" valueType="enumerated"/>

+ 1 - 1
CMSIS/CoreValidation/Examples/DS-MDK/Cortex-A7/GCC/RTE/CMSIS_CORE_Validation/CV_Config.h

@@ -16,7 +16,7 @@
 // <o> Print Output Format <0=> Plain Text <1=> XML
 // <i> Set the test results output format to plain text or XML
 #ifndef PRINT_XML_REPORT
-#define PRINT_XML_REPORT            0
+#define PRINT_XML_REPORT            1
 #endif
 // <o> Buffer size for assertions results
 // <i> Set the buffer size for assertions results buffer

+ 1 - 1
CMSIS/CoreValidation/Examples/DS-MDK/Cortex-A9/GCC/RTE/CMSIS_CORE_Validation/CV_Config.h

@@ -16,7 +16,7 @@
 // <o> Print Output Format <0=> Plain Text <1=> XML
 // <i> Set the test results output format to plain text or XML
 #ifndef PRINT_XML_REPORT
-#define PRINT_XML_REPORT            0
+#define PRINT_XML_REPORT            1
 #endif
 // <o> Buffer size for assertions results
 // <i> Set the buffer size for assertions results buffer

+ 112 - 0
CMSIS/CoreValidation/Examples/DS-MDK/build.py

@@ -0,0 +1,112 @@
+#! python
+
+import sys
+from argparse import ArgumentParser
+from datetime import datetime
+
+sys.path.append('../../../Utilities/buildutils') 
+
+from fvpcmd import FvpCmd 
+from testresult import TestResult
+
+DEVICE_A5  = 'Cortex-A5'
+DEVICE_A7  = 'Cortex-A7'
+DEVICE_A9  = 'Cortex-A9'
+
+CC_AC6 = 'AC6'
+CC_AC5 = 'AC5'
+CC_GCC = 'GCC'
+
+TARGET_FVP = 'FVP'
+
+DEVICES = [ DEVICE_A5, DEVICE_A7, DEVICE_A9 ]
+COMPILERS = [ CC_AC5, CC_AC6, CC_GCC ]
+TARGETS = [ TARGET_FVP ]
+
+SKIP = [ 
+  ]
+
+DEVICE_ABREV = {
+  DEVICE_A5 : 'CA5',
+  DEVICE_A7 : 'CA7',
+  DEVICE_A9 : 'CA9'
+}
+  
+APP_FORMAT = {
+  CC_AC6: "axf",
+  CC_AC5: "axf",
+  CC_GCC: "elf"
+}
+  
+FVP_MODELS = { 
+    DEVICE_A5   : { 'cmd': "fvp_ve_cortex-a5x1.exe",  'args': { 'limit': "5000000" } },
+    DEVICE_A7   : { 'cmd': "fvp_ve_cortex-a7x1.exe",  'args': { 'limit': "5000000" } },
+    DEVICE_A9   : { 'cmd': "fvp_ve_cortex-a9x1.exe",  'args': { 'limit': "5000000" } }
+  }
+
+def isSkipped(dev, cc, target):
+  for skip in SKIP:
+    skipDev = (skip[0] == None or skip[0] == dev)
+    skipCc = (skip[1] == None or skip[1] == cc)
+    skipTarget = (skip[2] == None or skip[2] == target)
+    if skipDev and skipCc and skipTarget:
+      return True
+  return False
+
+def prepare(steps, args):
+  for dev in args.devices:
+    for cc in args.compilers:
+      for target in args.targets:
+        if not isSkipped(dev, cc, target):
+          config = "{dev} ({cc}, {target})".format(dev = dev, cc = cc, target = target)
+          prefix = "{dev}_{cc}_{target}".format(dev = dev, cc = cc, target = target)
+          build = None
+          binary = "{dev}/{cc}/Debug/CMSIS_CV_{abrev}_{cc}.{format}".format(dev = dev, abrev = DEVICE_ABREV[dev], cc = cc, format = APP_FORMAT[cc])
+          test = FvpCmd(FVP_MODELS[dev]['cmd'], binary, **FVP_MODELS[dev]['args'])
+          steps += [ { 'name': config, 'prefix': prefix, 'build': build, 'test': test } ]
+
+def execute(steps):
+  for step in steps:
+    print step['name']
+    if step['build']:
+      step['build'].run()
+    else:
+      print "Skipping build"
+      
+    if (not step['build']) or step['build'].isSuccess():
+      step['test'].run()
+      step['result'] = TestResult(step['test'].getOutput())
+      step['result'].saveXml("result_{0}_{1}.xml".format(step['prefix'], datetime.now().strftime("%Y%m%d%H%M%S")))
+    else:
+      print "Skipping test"
+      
+def printSummary(steps):
+  print ""
+  print "Test Summary"
+  print "============"
+  print
+  print "Test run                       Total Exec  Pass  Fail  "
+  print "-------------------------------------------------------"
+  for step in steps:
+    try:
+      print "{0:30} {1:>4}  {2:>4}  {3:>4}  {4:>4}".format(step['name'], *step['result'].getSummary())
+    except:
+      print "{0:30} ------ NO RESULTS ------".format(step['name'])
+
+def main(argv):
+  parser = ArgumentParser()
+  parser.add_argument('-d', '--devices', nargs='*', choices=DEVICES, default=DEVICES, help = 'Devices to be considered.')
+  parser.add_argument('-c', '--compilers', nargs='*', choices=COMPILERS, default=COMPILERS, help = 'Compilers to be considered.')
+  parser.add_argument('-t', '--targets', nargs='*', choices=TARGETS, default=TARGETS, help = 'Targets to be considered.')
+  args = parser.parse_args()
+    
+  steps = []
+
+  prepare(steps, args)
+  
+  execute(steps)
+  
+  printSummary(steps)
+  
+if __name__ == "__main__":
+  main(sys.argv[1:])