diff --git a/cmake/Platform/size_script.py b/cmake/Platform/size_script.py index 1ce3a37..b3342de 100644 --- a/cmake/Platform/size_script.py +++ b/cmake/Platform/size_script.py @@ -74,7 +74,7 @@ def eprint(*args, **kwargs): size_complete = 0 if args.regex and args.regex != "": - nums = re.findall(args.regex + "", output, re.MULTILINE) + nums = re.findall(args.regex + "", output.decode(), re.MULTILINE) if nums: size_complete = sum(map(int, nums)) else: @@ -83,13 +83,13 @@ def eprint(*args, **kwargs): size_data = 0 if args.regex_data and args.regex_data != "": - nums = re.findall(args.regex_data + "", output, re.MULTILINE) + nums = re.findall(args.regex_data + "", output.decode(), re.MULTILINE) if nums: size_data = sum(map(int, nums)) size_eeprom = 0 if args.regex_eeprom and args.regex_eeprom != "": - nums = re.findall(args.regex_eeprom + "", output, re.MULTILINE) + nums = re.findall(args.regex_eeprom + "", output.decode(), re.MULTILINE) if nums: size_eeprom = sum(map(int, nums)) @@ -150,4 +150,4 @@ def sizeof_fmt(num, suffix='B'): if size_eeprom > 0: eepromSizeStr = "EEPROM size: \t\t{} bytes".format(size_eeprom) - print(eepromSizeStr) \ No newline at end of file + print(eepromSizeStr)