diff -r be27ed110b50 -r d8ac696cc51f buildframework/helium/tools/compile/compile.ant.xml --- a/buildframework/helium/tools/compile/compile.ant.xml Wed Oct 28 14:39:48 2009 +0000 +++ b/buildframework/helium/tools/compile/compile.ant.xml Wed Dec 23 19:29:07 2009 +0200 @@ -30,7 +30,7 @@ - + @@ -57,7 +57,7 @@ - + - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -356,56 +363,36 @@ - + - + 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(',')) - +