diff -r 820b22e13ff1 -r 39c28ec933dd buildframework/helium/tools/compile/compile.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tools/compile/compile.ant.xml Mon May 10 19:54:49 2010 +0100 @@ -0,0 +1,461 @@ + + + + + + Targets related to compile stage. It includes cmaker, + ec, ebs, sbs, sbs-ec build system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +import fileinput +import re + +COMMANDLINE_RE = r'CommandLine="(.*?)"' +ECHO_REPLACEMENT = r'CommandLine="echo \1"' + +for line in fileinput.input(["${genxml.output.file}"], inplace=True): + print re.sub(COMMANDLINE_RE, ECHO_REPLACEMENT, line).rstrip() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 and self.component != None and attrs.get('priority', None) != None: + if attrs.get('priority') in self.components[self.component]: + self.components[self.component][attrs.get('priority')] += 1 + + def endElement(self, name): + if name == 'log': + self.scanLog = False + self.level = 0 + self.component = None + elif name == 'task': + self.level = self.level - 1 + + +parser = make_parser() +diamondsSummary = DiamondsSummary() +parser.setContentHandler(diamondsSummary) +parser.parse(open(str(project.getProperty('build.summary.file')))) + +output = '\n\n' +output += '\n' +for name in diamondsSummary.components: + xname = quoteattr(name) + output += '\n' % (xname, diamondsSummary.components[name]['error'], diamondsSummary.components[name]['critical'], diamondsSummary.components[name]['warning']) + #print name + " ==> %d" % diamondsSummary.components[name]['error'] +output += '\n' +output += '\n' % (diamondsSummary.total['error'], diamondsSummary.total['critical'], diamondsSummary.total['warning']) +output += '\n' +self.log(str("Writing %s" % str(attributes.get('output')))) +f = open(str(attributes.get('output')), 'w+') +f.write(output) + ]]> + + + + + + + + + + + + + +import logging +import compilation +import sysdef.api +#logging.basicConfig(level=logging.DEBUG) +logging.basicConfig(level=logging.INFO) + +logging.info('Reading the System Sefinition information') +sysDef = sysdef.api.SystemDefinition(r'${canonical.sysdef.file}') + +bnsizelogger = compilation.BinarySizeLogger(sysDef) +# Read in the output binaries of each unit +bnsizelogger.read_output_binaries_per_unit(r'${build.logs.list}'.split(';')) + +# Read in the binary sizes listed in the ROM output logs +bnsizelogger.read_binary_sizes_in_rom_output_logs(r'${binary.sizes.rom.logs.list}'.split(';')) + +# Write out a .csv file containing +bnsizelogger.write2csvfile(r'${binary.sizes.output.file}', r'${sysdef.configurations.list}'.split(',')) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +