diff -r 1248e8f6a72d -r db59fc762214 buildframework/helium/tools/compile/compile.ant.xml --- a/buildframework/helium/tools/compile/compile.ant.xml Tue Mar 16 17:16:51 2010 +0000 +++ b/buildframework/helium/tools/compile/compile.ant.xml Thu Mar 18 15:06:42 2010 +0000 @@ -20,19 +20,41 @@ ============================================================================ --> + Targets related to compile stage. It includes cmaker, ec, ebs, sbs, sbs-ec build system. + + + + + - - - + + + @@ -41,6 +63,7 @@ + @@ -53,13 +76,14 @@ - + - - + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + - @@ -150,7 +181,7 @@ + log="${compile.log.dir}/${build.id}.${sysdef.configuration}_${genxml.output.file.suffix}.log" /> @@ -221,21 +252,21 @@ - + - + - + - + @@ -249,12 +280,12 @@ - + + error.limit="${build.errors.limit}" phase="compile"/> @@ -356,56 +387,40 @@ - + + - + import logging - -import build.io +import compilation import sysdef.api -import sysdef.io - #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 -logging.info('Reading the output binaries created by each unit.') -build_logs = r'${build.logs.list}'.split(';') -if len(build_logs) == 0: - raise Exception('List of build logs is empty!') -logging.info("The list of log files:\n") -logging.info("\n".join(build_logs)) -for logpath in build_logs: - binaries_reader = build.io.AbldLogWhatReader(logpath) - sysDef.merge_binaries(binaries_reader) +bnsizelogger.read_output_binaries_per_unit(r'${build.logs.list}'.split(';')) # Read in the binary sizes listed in the ROM output logs -logging.info('Reading the binary sizes of each binary from ROM logs.') -rom_logs = r'${binary.sizes.rom.logs.list}'.split(';') -if len(rom_logs) == 0: - raise Exception('List of ROM logs is empty!') -logging.info("The list of log files:\n") -logging.info("\n".join(rom_logs)) -for log in rom_logs: - binary_sizes_reader = build.io.RombuildLogBinarySizeReader(log) - sysDef.merge_binary_sizes(binary_sizes_reader) +bnsizelogger.read_binary_sizes_in_rom_output_logs(r'${binary.sizes.rom.logs.list}'.split(';')) # Write out a .csv file containing -size_writer = sysdef.io.FlashImageSizeWriter(r'${binary.sizes.output.file}') -size_writer.write(sysDef, r'${sysdef.configurations.list}'.split(',')) -size_writer.close() +bnsizelogger.write2csvfile(r'${binary.sizes.output.file}', r'${sysdef.configurations.list}'.split(',')) - +