Description
If there's a Black Magic Probe and you've run enough different serial port devices into your system such that it's a two-digit COM port, the Arduino integration doesn't properly prefix the path and thus the Arduino app is unable to connect to the Black Magic Probe.
To Reproduce
Steps to reproduce the behavior:
- Plug enough different USB serial devices devices into your computer that COM1-9 are reserved. (This is either a normal day in the life or a scavenger hunt, LOL)
- Plug a Black Magic Probe in, which will now reserve two COM ports with two-digit port numbers.
- Configure the the upload method to BMP, other settings don't really matter.
- Try to upload and notice the error message when it can't connect to the COM port.
Expected behavior
Arduino should at least connect to the Black Magic Probe and get farther along on the flashing process.
Desktop (please complete the following information):
- OS: Windows 10
- Arduino IDE version: 1.8.13
- STM32 core version: 2.0.0
- Upload method: BMP (Black Magic Probe)
Board (please complete the following information):
- Name: [e.g. Nucleo F429ZI]
- Hardware Revision: [e.g. Rev B]
- Extra hardware used if any: [e.g. X-Nucleo IKS01A1]
Additional context
It's a very Windows-specific thing, brought because of a legacy that's older than STMicroelectronics, LOL.
As shown on https://github.com/blacksphere/blackmagic/wiki/Getting-Started notice the quote:
On Windows, use the the COM port instead of /dev/ttyACM0
. For ports >= COM10, add the prefix \\.\
, for example:
target extended-remote COM3
target extended-remote \\.\COM10
Temporary workaround
Go into the Device manager, select "Show hidden devices" and go to the "Ports" section, right-click on each one and select "Uninstall device" to delete all of your serial ports or at least enough so that COM8 and COM9 are free, then connect your BMP again.