-
-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monitoring a serial port breaks upload #384
Comments
Nothing can be done here 😟 Device is busy by another process. The only one solution is terminate current process using administrative privileges. However, I don't recommend to use
Do you mean Arduino IDE? They have PID of opened serial monitor and can close/kill it before uploading and then restore it. PlatformIO is full flexible and independent toolkit. We don't limit users in their actions. Someone likes to use external Serial Monitor with GUI, others like platformio serialports monitor. We don't force users to use all our tools from @platformio. Our aim is to develop useful tools and improve obsolete practice with embedded development. User have ability to decide what is comfortable for him. As for me, I use CoolTerm. Of course, each time before uploading I manually disconnect/connect to SerialPort in GUI. |
The Sming framework does this similar to arduino IDE from command line when used "make flash".
Sorry I don't want to mention other frameworks here, but just for example/reference purpose I providing the idea. If it all this is possible to implement with a extra option to platformio command line, then it will be a great feature. Thoughts ? |
I've explained above the problem. All these IDEs work in own isolated space where they spawn child process and have their PIDs. You can reproduce same logic using own "isolated space" via script
What is more, you can put these line into infinite loop. |
I understand your point, Ivan. Was really checking if there was any trick or obvious omission, but was on a cautious side. For my purposes this one works quite well:
As soon as upload is done - it connects to the monitor, so I don't skip any early init output. Maybe we can put it in a FAQ as a best practice? |
@aperepel @ivankravets thanks. |
I use the following command and it is very useful: pio run --target upload --target monitor |
Solution
platformio run -t upload && platformio serialports monitor
Board: esp12e
If I attach to a serial port to monitor the output, it will prevent upload from working. Not sure what can be done here, but other environments manage to somehow do it. Reverse is true - if I start the upload process and attach to a serial port in another terminal window, it will fail the upload (and attach too).
Ideally, we'd like to keep the monitor open and attached and keep re-uploading the firmware iteratively. This way the monitor won't be skipping some init output and have us re-attach after every upload.
The text was updated successfully, but these errors were encountered: