Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tools/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def __init__(self, name, dir, output, make_flags=None):
self.needs_mpy_cross = dir not in ("bare-arm", "minimal")


mpy_cross_output = "mpy-cross/build/mpy-cross"

port_data = {
"b": PortData("bare-arm", "bare-arm", "build/firmware.elf"),
"m": PortData("minimal x86", "minimal", "build/firmware.elf"),
Expand Down Expand Up @@ -142,6 +144,8 @@ def do_diff(args):
max_delta = None
for key, value1 in data1.items():
value2 = data2[key]
if key == mpy_cross_output:
name = "mpy-cross"
for port in port_data.values():
if key == "ports/{}/{}".format(port.dir, port.output):
name = port.name
Expand Down Expand Up @@ -207,6 +211,10 @@ def do_sizes(args):
ports = parse_port_list(args)

print("COMPUTING SIZES")

if any(port.needs_mpy_cross for port in ports):
syscmd("size", mpy_cross_output)

for port in ports:
syscmd("size", "ports/{}/{}".format(port.dir, port.output))

Expand Down
Loading