Skip to content
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

Monitor requires standard input to be attached to TTY (IDFGH-13306) #14233

Closed
3 tasks done
EvgeniyVol opened this issue Jul 22, 2024 · 5 comments
Closed
3 tasks done

Monitor requires standard input to be attached to TTY (IDFGH-13306) #14233

EvgeniyVol opened this issue Jul 22, 2024 · 5 comments
Assignees
Labels
Resolution: Won't Do This will not be worked on Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@EvgeniyVol
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

https://github.com/espressif/esp-idf/releases/tag/v5.2.2

Operating System used.

Windows

How did you build your project?

CLion IDE

If you are using Windows, please specify command line type.

None

What is the expected behavior?

The COM port will be read

What is the actual behavior?

An error is coming out

Steps to reproduce.

  1. ESPPORT COM5
  2. flash build
  3. monitor build

Build or installation Logs.

====================[ Build | monitor | Debug ]=================================
"D:\CLion 2024.1.4\bin\cmake\win\x64\bin\cmake.exe" --build D:\ESP32EDF\ESP32Project\NewProject\hello_world\cmake-build-debug --target monitor -j 14
[0/1] C:\WINDOWS\system32\cmd.exe /C "cd /D D:\ESP32EDF\ESP32CLINE\esp-idf-v5.2.2\components\esptool_py && "D:\CLion 2024.1.4\bin\cmake\win\x64\bin\cmake.exe" -D IDF_PATH=D:/ESP32EDF/ESP32CLINE/esp-idf-v5.2.2 -D SERIAL_TOOL=python;-m;esp_idf_monitor -D SERIAL_TOOL_ARGS=--target;esp32;--revision;0;D:/ESP32EDF/ESP32Project/NewProject/hello_world/cmake-build-debug/hello_world.elf -D WORKING_DIRECTORY=D:/ESP32EDF/ESP32Project/NewProject/hello_world/cmake-build-debug -P run_serial_tool.cmake"
error: Monitor requires standard input to be attached to TTY
CMake Error at run_serial_tool.cmake:66 (message):
  python;-m;esp_idf_monitor failed.



FAILED: CMakeFiles/monitor D:/ESP32EDF/ESP32Project/NewProject/hello_world/cmake-build-debug/CMakeFiles/monitor 
C:\WINDOWS\system32\cmd.exe /C "cd /D D:\ESP32EDF\ESP32CLINE\esp-idf-v5.2.2\components\esptool_py && "D:\CLion 2024.1.4\bin\cmake\win\x64\bin\cmake.exe" -D IDF_PATH=D:/ESP32EDF/ESP32CLINE/esp-idf-v5.2.2 -D SERIAL_TOOL=python;-m;esp_idf_monitor -D SERIAL_TOOL_ARGS=--target;esp32;--revision;0;D:/ESP32EDF/ESP32Project/NewProject/hello_world/cmake-build-debug/hello_world.elf -D WORKING_DIRECTORY=D:/ESP32EDF/ESP32Project/NewProject/hello_world/cmake-build-debug -P run_serial_tool.cmake"
ninja: build stopped: subcommand failed.

More Information.

No response

@EvgeniyVol EvgeniyVol added the Type: Bug bugs in IDF label Jul 22, 2024
@github-actions github-actions bot changed the title Monitor requires standard input to be attached to TTY Monitor requires standard input to be attached to TTY (IDFGH-13306) Jul 22, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Jul 22, 2024
@peterdragun
Copy link
Collaborator

Hi @EvgeniyVol, can you please provide some more details? How are you executing the monitor? Are you using some IDE shortcut? Or are you executing the command in the integrated terminal of IDE?

If you are using some button in the IDE to execute the monitor, please make sure that you have followed the installation guide on the Clion website: https://www.jetbrains.com/help/clion/esp-idf.html

Please ensure you can execute the monitor using the idf.py monitor or python -m esp_idf_monitor command. Note that both commands need to be run in the ESP-IDF environment. Both the command line and PowerShell should work in this case.

@EvgeniyVol
Copy link
Author

  1. IDE CLion 2024.1.4
  2. I use the configuration in the upper right corner and the build button
  3. Everything works in IDE terminal
  4. I did as it says it doesn't work https://www.jetbrains.com/help/clion/esp-idf.html
  5. In command line everything works

@peterdragun
Copy link
Collaborator

If everything works in the terminal, I am afraid that we cannot do anything about that from the ESP-IDF side. Please report the bug to CLion.

@dobairoland
Copy link
Collaborator

dobairoland commented Jul 24, 2024

It is interesting that the linked page has a video tutorial and this issue is not happening there. IDF Monitor requires STDIN to be connected to it from the very beginning because it is an interactive tool and is not just receiving but also sending characters to the ESP. So I guess something must have changed on the Clion side. I agree that this should be address on their side.

However, we might think about to add a non-interactive mode for IDF Monitor in the future when it won't send anything and those related features would be disabled. Or if no STDIN is attached then disable those features with a warning.

@EvgeniyVol
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Won't Do This will not be worked on Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

4 participants