Skip to content

Conversation

icewind1991
Copy link
Member

Adds a basic --monitor option to open a serial monitor after flashing is completed

Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

After addressing the issue clippy spotted, this is all good I think!

@jessebraham
Copy link
Member

This seems to work fine on my Mac, however it will not build on Windows for me. I believe termion is the culprit, output can be found in this gist. It's possible that it's an issue with my system, but is somebody else able to confirm?

@icewind1991
Copy link
Member Author

switched to crossterm for doing the terminal handling which does work under windows

@jessebraham
Copy link
Member

I'm unfortunately still having issues on Windows :(

PS C:\Users\Jesse Braham\Documents\Sandbox\esp32c3-experiments> cargo espflash --monitor COM3
   Compiling esp32c3 v0.1.0 (C:\Users\Jesse Braham\Documents\Sandbox\esp32c3-experiments)
    Finished dev [unoptimized + debuginfo] target(s) in 0.74s
Serial port: COM3
Connecting...

[00:00:01] ########################################      12/12      segment 0x0
[00:00:00] ########################################       1/1       segment 0x8000
[00:00:01] ########################################      13/13      segment 0x10000
Commands:
    CTRL+R    Reset chip
    CTRL+C    Exit

Error: Windows stdio in console mode does not support writing non-UTF-8 byte sequences

@icewind1991
Copy link
Member Author

Can't reproduce:

image

@jessebraham
Copy link
Member

Okay, if it's working for you then it's likely that the issue lies with my installation. I recall having changed the default PowerShell encoding at some point so that may have something to do with it. Thank you for checking.

@icewind1991
Copy link
Member Author

@jessebraham can you see if the latest commit changes anything for you?

@jessebraham
Copy link
Member

That seems to have fixed it, thanks!

@icewind1991 icewind1991 merged commit 1a86d2f into master Sep 15, 2021
@icewind1991 icewind1991 deleted the serial-monitor branch September 15, 2021 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants