Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 build fails on MTS_MDOT_F411RE #8618

klaas019 opened this Issue Nov 1, 2018 · 1 comment


None yet
3 participants
Copy link

klaas019 commented Nov 1, 2018


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/", line 293, in <module>
  File "mbed-os/tools/", line 559, in build_project
    res, _ = toolchain.link_program(resources, build_path, name)
  File "mbed-os/tools/toolchains/", line 638, in link_program
    self.binary(r, elf, bin)
  File "mbed-os/tools/", line 54, in wrapper
    post_res = tooldesc["post"](t_self, *args, **kwargs)
  File "mbed-os/tools/targets/", line 470, in combine_bins_mts_dot
    MTSCode._combine_bins_helper("MTS_MDOT_F411RE", binf)
  File "mbed-os/tools/targets/", 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

This comment has been minimized.

Copy link

ciarmcom commented Nov 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.