Skip to content

Commit

Permalink
Fixed an issue when a serial port was not automatically detected if t…
Browse files Browse the repository at this point in the history
…he board has predefined HWIDs
  • Loading branch information
ivankravets committed Jul 9, 2022
1 parent ddfe5a6 commit 0bd27a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Expand Up @@ -17,6 +17,7 @@ PlatformIO Core 6
~~~~~~~~~~~~~~~~~~

* Show "TimeoutError" only in the verbose mode when can not find a serial port
* Fixed an issue when a serial port was not automatically detected if the board has predefined HWIDs

6.1.0 (2022-07-06)
~~~~~~~~~~~~~~~~~~
Expand Down
6 changes: 4 additions & 2 deletions platformio/device/finder.py
Expand Up @@ -97,9 +97,11 @@ def find_serial_port( # pylint: disable=too-many-arguments

if upload_protocol and upload_protocol.startswith("blackmagic"):
return find_blackmagic_serial_port(prefer_gdb_port, timeout)
port = None
if board_config and board_config.get("build.hwids", []):
return find_board_serial_port(board_config, timeout, verbose)
port = find_known_uart_port(ensure_ready, timeout, verbose)
port = find_board_serial_port(board_config, timeout, verbose)
if not port:
port = find_known_uart_port(ensure_ready, timeout, verbose)
if port:
return port

Expand Down

11 comments on commit 0bd27a3

@DBSDBS
Copy link

@DBSDBS DBSDBS commented on 0bd27a3 Jul 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't work !!!

@ivankravets
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you run pio upgrade —dev? Double hyphen.

@DBSDBS
Copy link

@DBSDBS DBSDBS commented on 0bd27a3 Jul 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've coppied exactly the modified rows and put them in Finder.py... Received this

image

@DBSDBS
Copy link

@DBSDBS DBSDBS commented on 0bd27a3 Jul 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you run pio upgrade —dev? Double hyphen.

Now, I do not know WHERE to put this and run

@DBSDBS
Copy link

@DBSDBS DBSDBS commented on 0bd27a3 Jul 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked for upgrade, but I'm with the latest version

@DBSDBS
Copy link

@DBSDBS DBSDBS commented on 0bd27a3 Jul 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to Downgrade ? All was OK at 25.06.2022

@ivankravets
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VSCode, left sidebar, PlatformIO, MIsc, Upgrade PIO Core.

@DBSDBS
Copy link

@DBSDBS DBSDBS commented on 0bd27a3 Jul 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@DBSDBS
Copy link

@DBSDBS DBSDBS commented on 0bd27a3 Jul 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same error...

I know that my port is COM3... But can't understand WEHERE to put it as a FIXED port.... I tried in Finder.py, but without success...
Please help me!
I have a new hardware changes and must update the firmware !

@DBSDBS
Copy link

@DBSDBS DBSDBS commented on 0bd27a3 Jul 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@DBSDBS
Copy link

@DBSDBS DBSDBS commented on 0bd27a3 Jul 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Please sign in to comment.