Closed
Description
When connecting to the nucleo stm32wb55 repl on the stlink (usb <-> uart) port file transfers with mpremote above a certain (small) size always fail.
In this case, transferring a ~23K file hangs for about 15 seconds then fails with the below error.
micropython\ports\stm32\boards\NUCLEO_WB55>py ..\..\..\..\tools\mpremote\mpremote.py cp rfcore_firmware.py :
cp rfcore_firmware.py :rfcore_firmware.py
Traceback (most recent call last):
File "W:\home\anl\tempt\src\micropython\tools\mpremote\mpremote/../..\pyboard.py", line 582, in filesystem_command
op(src, dest2)
File "W:\home\anl\tempt\src\micropython\tools\mpremote\mpremote/../..\pyboard.py", line 522, in fs_put
self.exec_("w(" + repr(data) + ")")
File "W:\home\anl\tempt\src\micropython\tools\mpremote\mpremote/../..\pyboard.py", line 465, in exec_
ret, ret_err = self.exec_raw(command, data_consumer=data_consumer)
File "W:\home\anl\tempt\src\micropython\tools\mpremote\mpremote/../..\pyboard.py", line 456, in exec_raw
self.exec_raw_no_follow(command)
File "W:\home\anl\tempt\src\micropython\tools\mpremote\mpremote/../..\pyboard.py", line 434, in exec_raw_no_follow
return self.raw_paste_write(command_bytes)
File "W:\home\anl\tempt\src\micropython\tools\mpremote\mpremote/../..\pyboard.py", line 412, in raw_paste_write
raise PyboardError("could not complete raw paste: {}".format(data))
pyboard.PyboardError: could not complete raw paste: b''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "W:\home\anl\tempt\src\micropython\tools\mpremote\mpremote.py", line 6, in <module>
sys.exit(main.main())
File "W:\home\anl\tempt\src\micropython\tools\mpremote\mpremote\main.py", line 520, in main
do_filesystem(pyb, args)
File "W:\home\anl\tempt\src\micropython\tools\mpremote\mpremote\main.py", line 298, in do_filesystem
pyboard.filesystem_command(pyb, args)
File "W:\home\anl\tempt\src\micropython\tools\mpremote\mpremote/../..\pyboard.py", line 598, in filesystem_command
print(str(er.args[2], "ascii"))
IndexError: tuple index out of range
It fails in the same way after a similar timeout every time.
The same file transfer works perfectly on the direct usb port.
Transferring a 259 byte board.json works.
Transferring a 575 byte mpconfigboard.mk fails.
Note this is on Windows so may be related to #8358 - I will test shortly if this PR resolves (hides) the issue.