run: add -p/--port shortcut to set upload-port and monitor-port simultaneously.#5429
Open
TinyuZhao wants to merge 1 commit intoplatformio:developfrom
Open
run: add -p/--port shortcut to set upload-port and monitor-port simultaneously.#5429TinyuZhao wants to merge 1 commit intoplatformio:developfrom
TinyuZhao wants to merge 1 commit intoplatformio:developfrom
Conversation
Add shortcut option for upload and monitor ports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Problem
When developing with multiple devices connected, specifying
--upload-portdoes not automatically apply to--monitor-port. Users must repeat the same port twice:Worse, when
--upload-portis specified but--monitor-portis not, PlatformIO still scans all available serial ports to find a monitor port. This causes failures when other ports are occupied by different devices:This is counterintuitive — the user has already explicitly told PlatformIO which device to use, but PlatformIO still tries to touch other devices.
Expected Behavior
When a user specifies
--upload-port, PlatformIO should:monitor-portto the same port instead of scanning other portsSolution
Add
-p / --portas a shortcut that sets both--upload-portand--monitor-portto the same value:Use Case
Multi-device development environment:
Currently PlatformIO scans and tries to lock all ports even when the target port is explicitly specified, causing unnecessary errors.