Skip to content

Python3 build fails on MTS_MDOT_F411RE #8618

Closed
@klaas019

Description

@klaas019

Description

Build fails with python3 for MTS_MDOT_F411RE and other targets with bootloaders in mbed.
Reproduce by using python3 with mbed-os-5.10.2 GCC 6-2017-q2-update.

Traceback (most recent call last):
  File "mbed-os/tools/make.py", line 293, in <module>
    ignore=options.ignore
  File "mbed-os/tools/build_api.py", line 559, in build_project
    res, _ = toolchain.link_program(resources, build_path, name)
  File "mbed-os/tools/toolchains/__init__.py", line 638, in link_program
    self.binary(r, elf, bin)
  File "mbed-os/tools/hooks.py", line 54, in wrapper
    post_res = tooldesc["post"](t_self, *args, **kwargs)
  File "mbed-os/tools/targets/__init__.py", line 470, in combine_bins_mts_dot
    MTSCode._combine_bins_helper("MTS_MDOT_F411RE", binf)
  File "mbed-os/tools/targets/__init__.py", line 452, in _combine_bins_helper
    outbin.write('\xFF' * (64*1024 - len(data)))
TypeError: a bytes-like object is required, not 'str'

Fix : outbin.write(b'\xFF' * (64*1024 - len(data)))

Issue request type

[ ] Question
[ ] Enhancement
[X] Bug

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions