You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the bridge firmware does not perform any reboot until it's needed to reconfigure the native USB device (for example because the uploaded sketch includes the HID library to emulate Keyboard/Mouse or do MIDI stuff and the USB descriptor needs to be changed).
In the board.txt of the Renesas platform, the upload.wait_for_upload_port directive is currently set to false.
This works fine for uploading sketches that do not use cause USB reconfiguration, but it becomes problematic if the upload produces a USB port change (because the IDE will not follow the port change).
Since we cannot avoid the USB reconfiguration in some cases, I propose to uniform the upload in the other way and always restart the USB connection after each sketch upload. By doing so we could set the upload.wait_for_upload_port directive to true and correctly handle all sketch uploads.
Another bonus is that after restarting the USB connection we can always restart the bridge from a clean state.
In all other cases, the bridge can continue to run continuously as it is now, for example, if the user opens and closes the monitor, the reboot is not needed.
The wait_for_port is not really a bridge reboot but more a "safer" way to get out of the esp->native->esp connection. I'm ok for setting it to true since it shouldn't have any drawback for normal sketches
Currently, the bridge firmware does not perform any reboot until it's needed to reconfigure the native USB device (for example because the uploaded sketch includes the
HID
library to emulate Keyboard/Mouse or do MIDI stuff and the USB descriptor needs to be changed).In the
board.txt
of theRenesas
platform, theupload.wait_for_upload_port
directive is currently set tofalse
.This works fine for uploading sketches that do not use cause USB reconfiguration, but it becomes problematic if the upload produces a USB port change (because the IDE will not follow the port change).
Since we cannot avoid the USB reconfiguration in some cases, I propose to uniform the upload in the other way and always restart the USB connection after each sketch upload. By doing so we could set the
upload.wait_for_upload_port
directive totrue
and correctly handle all sketch uploads.Another bonus is that after restarting the USB connection we can always restart the bridge from a clean state.
In all other cases, the bridge can continue to run continuously as it is now, for example, if the user opens and closes the monitor, the reboot is not needed.
Related issues:
arduino/ArduinoCore-renesas#73
arduino/ArduinoCore-renesas#74
The text was updated successfully, but these errors were encountered: