mirror of https://github.com/ARMmbed/mbed-os.git
Python2+3: The rest of mbed compile
parent
380ecb1b0e
commit
10a91216f5
|
@ -525,7 +525,7 @@ class MemapParser(object):
|
||||||
self.compute_report()
|
self.compute_report()
|
||||||
try:
|
try:
|
||||||
if file_output:
|
if file_output:
|
||||||
file_desc = open(file_output, 'wb')
|
file_desc = open(file_output, 'w')
|
||||||
else:
|
else:
|
||||||
file_desc = stdout
|
file_desc = stdout
|
||||||
except IOError as error:
|
except IOError as error:
|
||||||
|
@ -559,24 +559,24 @@ class MemapParser(object):
|
||||||
Positional arguments:
|
Positional arguments:
|
||||||
file_desc - the file to write out the final report to
|
file_desc - the file to write out the final report to
|
||||||
"""
|
"""
|
||||||
csv_writer = csv.writer(file_desc, delimiter=',',
|
writer = csv.writer(file_desc, delimiter=',',
|
||||||
quoting=csv.QUOTE_MINIMAL)
|
quoting=csv.QUOTE_MINIMAL)
|
||||||
|
|
||||||
csv_module_section = []
|
module_section = []
|
||||||
csv_sizes = []
|
sizes = []
|
||||||
for i in sorted(self.short_modules):
|
for i in sorted(self.short_modules):
|
||||||
for k in self.print_sections:
|
for k in self.print_sections:
|
||||||
csv_module_section += [i+k]
|
module_section.append((i + k))
|
||||||
csv_sizes += [self.short_modules[i][k]]
|
sizes += [self.short_modules[i][k]]
|
||||||
|
|
||||||
csv_module_section += ['static_ram']
|
module_section.append('static_ram')
|
||||||
csv_sizes += [self.mem_summary['static_ram']]
|
sizes.append(self.mem_summary['static_ram'])
|
||||||
|
|
||||||
csv_module_section += ['total_flash']
|
module_section.append('total_flash')
|
||||||
csv_sizes += [self.mem_summary['total_flash']]
|
sizes.append(self.mem_summary['total_flash'])
|
||||||
|
|
||||||
csv_writer.writerow(csv_module_section)
|
writer.writerow(module_section)
|
||||||
csv_writer.writerow(csv_sizes)
|
writer.writerow(sizes)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def generate_table(self, file_desc):
|
def generate_table(self, file_desc):
|
||||||
|
|
|
@ -221,13 +221,13 @@ class Resources:
|
||||||
"""
|
"""
|
||||||
count = 0
|
count = 0
|
||||||
dupe_dict, dupe_headers = self._collect_duplicates(dict(), dict())
|
dupe_dict, dupe_headers = self._collect_duplicates(dict(), dict())
|
||||||
for objname, filenames in dupe_dict.iteritems():
|
for objname, filenames in dupe_dict.items():
|
||||||
if len(filenames) > 1:
|
if len(filenames) > 1:
|
||||||
count+=1
|
count+=1
|
||||||
toolchain.tool_error(
|
toolchain.tool_error(
|
||||||
"Object file %s.o is not unique! It could be made from: %s"\
|
"Object file %s.o is not unique! It could be made from: %s"\
|
||||||
% (objname, " ".join(filenames)))
|
% (objname, " ".join(filenames)))
|
||||||
for headername, locations in dupe_headers.iteritems():
|
for headername, locations in dupe_headers.items():
|
||||||
if len(locations) > 1:
|
if len(locations) > 1:
|
||||||
count+=1
|
count+=1
|
||||||
toolchain.tool_error(
|
toolchain.tool_error(
|
||||||
|
@ -847,7 +847,7 @@ class mbedToolchain:
|
||||||
# ARM, GCC, IAR cross compatible
|
# ARM, GCC, IAR cross compatible
|
||||||
def get_link_file(self, cmd):
|
def get_link_file(self, cmd):
|
||||||
link_file = join(self.build_dir, ".link_files.txt")
|
link_file = join(self.build_dir, ".link_files.txt")
|
||||||
with open(link_file, "wb") as f:
|
with open(link_file, "w") as f:
|
||||||
cmd_list = []
|
cmd_list = []
|
||||||
for c in cmd:
|
for c in cmd:
|
||||||
if c:
|
if c:
|
||||||
|
|
Loading…
Reference in New Issue