8000 ports/esp32: silence ESP-IDF log messages when in raw REPL mode by nickzoic · Pull Request #3817 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

ports/esp32: silence ESP-IDF log messages when in raw REPL mode #3817

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

Closed

Conversation

nickzoic
Copy link
Contributor

This prevents clients such as ampy, mpy-utils, etc getting confused
by extraneous data.

This prevents clients such as ampy, mpy-utils, etc getting confused
by extraneous data.
@dpgeorge
Copy link
Member

It looks pretty good! I assume it was tested, with current master?

BTW, did you consider using esp_log_level_set("*", ESP_LOG_NONE) instead?

@nickzoic
Copy link
Contributor Author
nickzoic commented May 24, 2018 via email

@nickzoic
Copy link
Contributor Author
nickzoic commented May 24, 2018

Brief checks:

Before: blabber.txt
After: less-blabber.txt

@nickzoic
Copy link
Contributor Author

(related:
micropython/micropython-esp32#231
micropython/micropython-esp32#165

I'd forgotten about: micropython/micropython-esp32#112 though, which adds esp.osdebug() ... that may make this PR redundant.

(I do still quite like the idea of shutting logs off automatically while doing a raw repl command. But I'm wondering now if that should only happen while running the command, eg: only between the command being sent and the response being finished with the second \x04. There's a bit of a race condition there though so perhaps I'm overthinking it.)

Alternatively, we could use esp_log_set_vprintf to make esp.osdebug a little more flexible ...

@dpgeorge
Copy link
Member

I do still quite like the idea of shutting logs off automatically while doing a raw repl command. But I'm wondering now if that should only happen while running the command, eg: only between the command being sent and the response being finished with the second \x04

I think what you've done in this PR is the best approach. Raw REPL is supposed to be only for computer consumption/use and the computer in such a case doesn't expect any output from the device while in raw REPL and while uploading code.

@dpgeorge
Copy link
Member

Ok, merged in ef4c8e6

@dpgeorge dpgeorge closed this May 28, 2018
tannewt added a commit to tannewt/circuitpython that referenced this pull request Dec 16, 2020
…-debug

esp32s2: Reserve UART pins only if DEBUG=1 is set to address issue 3811
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.

2 participants
0