Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

If sketch is not connected to serial - dump serial output#123

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
facchinm merged 1 commit intoarduino:arduinofromKurtE:no_usb_no_hang
May 21, 2025

Conversation

KurtE
Copy link

Shouldresolve#35

Tested with Portenta, but should work on all of the others as well.

Current code would hang after a few Serial.print like statements happened when we are not connected to the Serial monitor.

So I put overrides in for the Serial.write(buf, cnt) and Serial.flush() That would first check to see if Serial returns true (DTR)...

This appears to match the behavior of the MBED Portenta H8 code.

facchinm reacted with rocket emoji
Current code would hang after a few Serial.print like statements happened when we are not connected tothe Serial monitor.So I put overrides in for the Serial.write(buf, cnt) and Serial.flush()That would first check to see if Serial returns true (DTR)...This appears to match the behavior of the MBED Portenta H8 code.
@facchinmfacchinm merged commitfe9e040 intoarduino:arduinoMay 21, 2025
15 checks passed
@KurtEKurtE deleted the no_usb_no_hang branchMay 21, 2025 14:22
facchinm added a commit to facchinm/ArduinoCore-zephyr that referenced this pull requestJun 20, 2025
This would have been spotted if we extend the CI to compile all the exaples (TestClient in particular).
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

GIGA: Serial.flush() will hang if the Serial monitor is not connected.
2 participants
@KurtE@facchinm

[8]ページ先頭

©2009-2025 Movatter.jp