Skip to content

Terminal monitor still cannot build, flash or app flash (IEP-1509) #1200

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

Open
MrutyunjayPatel opened this issue Apr 15, 2025 · 12 comments
Open
Assignees

Comments

@MrutyunjayPatel
Copy link

hi,
Downloaded and Started using the latest IDE version the ide to 3.3.0.
still the issue persists.
Cannot build and app- flash when running terminal from with the IDE "idf.py monitor -E"

#1129

E (4620) ETH_INIT: esp eth start----------
--- Running d:\esp-idf-tools\python_env\idf5.3_py3.11_env\Scripts\python.exe D:/esp-idf-v5.3.X/\tools\idf.py encrypted-app-flash...
ESP-IDF v5.3.2-dirty
"cmake" must be available on the PATH to use idf.py
Executing action: encrypted-app-flash
--- Build failed
--- Press Ctrl+] to exit monitor.
--- Press Ctrl+F to build & flash project.
--- Press Ctrl+A to build & flash app.
--- Press any other key to resume monitor (resets target).

from the terminal window

D:\ESP32-WorkspaceIDF53X\ESP32_RCU>cmake --version
cmake version 3.30.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

D:\ESP32-WorkspaceIDF53X\ESP32_RCU>

Refreshing the IDF manager for IDF ver 5.3.2 gives this warning,

Executing d:\esp-idf-tools\python_env\idf5.3_py3.11_env/Scripts/python.exe D:\esp-idf-v5.3.X\tools\idf.py --version
Setting IDF_PATH environment variable: D:\esp-idf-v5.3.X
WARNING: The IDF_PYTHON_ENV_PATH is missing in environmental variables!
ESP-IDF v5.3.2-dirty

Executing d:\esp-idf-tools\python_env\idf5.3_py3.11_env/Scripts/python.exe D:\esp-idf-v5.3.X\tools\idf.py --list-targets
Setting IDF_PATH environment variable: D:\esp-idf-v5.3.X
WARNING: The IDF_PYTHON_ENV_PATH is missing in environmental variables!
esp32
esp32s2
esp32c3
esp32s3
esp32c2
esp32c6
esp32h2
esp32p4

Executing d:\esp-idf-tools\python_env\idf5.3_py3.11_env/Scripts/python.exe -m pip list
Tools Activated` 

From the terminal command line

D:\ESP32-WorkspaceIDF53X\ESP32_RCU>echo %IDF_PYTHON_ENV_PATH%
d:\esp-idf-tools\python_env\idf5.3_py3.11_env

D:\ESP32-WorkspaceIDF53X\ESP32_RCU>

#Product information

* xtensa-esp-elf-gdb: GDB for Xtensa
  - 14.2_20240403 (recommended, installed)
* riscv32-esp-elf-gdb: GDB for RISC-V
  - 14.2_20240403 (recommended, installed)
* xtensa-esp-elf: Toolchain for 32-bit Xtensa based on GCC
  - esp-13.2.0_20240530 (recommended, installed)
* esp-clang: Toolchain for all Espressif chips based on clang (optional)
  - 16.0.1-fe4f10a809 (recommended, installed)
* riscv32-esp-elf: Toolchain for 32-bit RISC-V based on GCC
  - esp-13.2.0_20240530 (recommended, installed)
* esp32ulp-elf: Toolchain for ESP32 ULP coprocessor
  - 2.38_20240113 (recommended, installed)
* cmake: CMake build system
  - 3.30.2 (recommended, installed)
  - 3.16.3 (supported)
* openocd-esp32: OpenOCD for ESP32
  - v0.12.0-esp32-20241016 (recommended, installed)
* ninja: Ninja build system
  - 1.12.1 (recommended, installed)
* idf-exe: IDF wrapper tool for Windows
  - 1.0.3 (recommended, installed)
* ccache: Ccache (compiler cache)
  - 4.10.2 (recommended, installed)
* dfu-util: dfu-util (Device Firmware Upgrade Utilities)
  - 0.11 (recommended, installed)
* esp-rom-elfs: ESP ROM ELFs
  - 20240305 (recommended, installed)
* qemu-xtensa: QEMU for Xtensa (optional)
  - esp_develop_9.0.0_20240606 (recommended, installed)
* qemu-riscv32: QEMU for RISC-V (optional)
  - esp_develop_9.0.0_20240606 (recommended, installed)
OK

CDT Build environment variables
USERDOMAIN_ROAMINGPROFILE: MBP-DELL
PATH: d:\esp-idf-tools\tools\xtensa-esp-elf-gdb\14.2_20240403\xtensa-esp-elf-gdb\bin;d:\esp-idf-tools\tools\riscv32-esp-elf-gdb\14.2_20240403\riscv32-esp-elf-gdb\bin;d:\esp-idf-tools\tools\xtensa-esp-elf\esp-13.2.0_20240530\xtensa-esp-elf\bin;d:\esp-idf-tools\tools\esp-clang\16.0.1-fe4f10a809\esp-clang\bin;d:\esp-idf-tools\tools\riscv32-esp-elf\esp-13.2.0_20240530\riscv32-esp-elf\bin;d:\esp-idf-tools\tools\esp32ulp-elf\2.38_20240113\esp32ulp-elf\bin;d:\esp-idf-tools\tools\cmake\3.30.2\bin;d:\esp-idf-tools\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\bin;d:\esp-idf-tools\tools\ninja\1.12.1\;d:\esp-idf-tools\tools\idf-exe\1.0.3\;d:\esp-idf-tools\tools\ccache\4.10.2\ccache-4.10.2-windows-x86_64;d:\esp-idf-tools\tools\dfu-util\0.11\dfu-util-0.11-win64;d:\esp-idf-tools\tools\qemu-xtensa\esp_develop_9.0.0_20240606\qemu\bin;d:\esp-idf-tools\tools\qemu-riscv32\esp_develop_9.0.0_20240606\qemu\bin;d:\esp-idf-tools\python_env\idf5.3_py3.11_env\Scripts;D:\esp-idf-v5.3.X\tools;D:/espressif-ide-330//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.12.v20240802-1518/jre/bin/server;D:/espressif-ide-330//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.12.v20240802-1518/jre/bin;C:\Program Files\FireDaemon OpenSSL 3\bin\;C:\Program Files (x86)\VMware\VMware Player\bin\;C:\Windows;C:\Windows\system32;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\nodejs\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\NetSarang\Xshell 7\;C:\Program Files (x86)\NetSarang\Xftp 7\;C:\Program Files (x86)\Universal Extractor;C:\Program Files (x86)\Universal Extractor\bin;C:\Program Files\usbipd-win\;C:\Program Files (x86)\ZeroTier\One\;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\NetSarang\Xshell 8\;C:\Program Files\PuTTY\;C:\Program Files (x86)\NetSarang\Xftp 8\;C:\Python311;C:\Program Files\Git\cmd;C:\Program Files\WireGuard\;C:\Users\raylogic_202\AppData\Local\Microsoft\WindowsApps;D:\VSCode\bin;C:\Users\raylogic_202\.dotnet\tools;C:\Users\raylogic_202\AppData\Roaming\npm;C:\Users\raylogic_202\AppData\Local\GitHubDesktop\bin;;D:\espressif-ide-330;
PROCESSOR_LEVEL: 6
SESSIONNAME: Console
ALLUSERSPROFILE: C:\ProgramData
PROCESSOR_ARCHITECTURE: AMD64
ESP_IDF_VERSION: 5.3.2
PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
SystemDrive: C:
EFC_35920: 1
OPENOCD_SCRIPTS: d:\esp-idf-tools\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\share\openocd\scripts
IDF_DEACTIVATE_FILE_PATH: C:\Users\RAYLOG~1\AppData\Local\Temp\tmpxmx1y8jvidf_46012
IDF_COMPONENT_STORAGE_URL: file:///d:/esp-idf-tools/registry;default
IDF_CCACHE_ENABLE: 1
USERNAME: mrutyunjay
ProgramFiles(x86): C:\Program Files (x86)
FPS_BROWSER_USER_PROFILE_STRING: Default
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
DriverData: C:\Windows\System32\Drivers\DriverData
ProgramData: C:\ProgramData
IDF_COMPONENT_MANAGER: 1
ProgramW6432: C:\Program Files
HOMEPATH: \Users\raylogic_202
PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 167 Stepping 1, GenuineIntel
PYTHON_EXE_PATH: d:/esp-idf-tools/python_env/idf5.3_py3.11_env/Scripts/python.exe
ProgramFiles: C:\Program Files
PUBLIC: C:\Users\Public
windir: C:\WINDOWS
=::: ::\
ZES_ENABLE_SYSMAN: 1
IGCCSVC_DB: AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAiU1Twt6RpEi9w6vXHWlIFAQAAAACAAAAAAAQZgAAAAEAACAAAAASrfszIUNGKxNwo9/29WA8NzNdrnw8kw6zK35uBh0jmQAAAAAOgAAAAAIAACAAAABuLxLxbArB9F5+jN6Qza9ZqWlBG+8NzyLiUPrZ2tSfUWAAAADzPhUoI5RFXQL5ulcaXfPU7h31VY8vTgF5zTYf6NL+rLvpsSz5lqsupYPL6Yv3+lCdIickhmyg2oMnX1mF1gD+p3RvDEhZ4sI8XVH2Nq7/xKO7JQGSTQM1IdRvK4ShyN5AAAAA5jOkO3kX1cch/qHSFt5Nod9fAIA0SLrsiJGuETzaeoe6eNrNEb/cVUQ5rqbogeI3kiCOLcGkKcBIkCsgnhoQ5w==
LOCALAPPDATA: C:\Users\raylogic_202\AppData\Local
USERDOMAIN: MBP-DELL
FPS_BROWSER_APP_PROFILE_STRING: Internet Explorer
LOGONSERVER: \\MBP-DELL
IDF_TOOLS_PATH: d:/esp-idf-tools
OneDrive: C:\Users\raylogic_202\OneDrive
APPDATA: C:\Users\raylogic_202\AppData\Roaming
CommonProgramFiles: C:\Program Files\Common Files
Path: D:/espressif-ide-330//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.12.v20240802-1518/jre/bin/server;D:/espressif-ide-330//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.12.v20240802-1518/jre/bin;C:\Program Files\FireDaemon OpenSSL 3\bin\;C:\Program Files (x86)\VMware\VMware Player\bin\;C:\Windows;C:\Windows\system32;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\nodejs\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\NetSarang\Xshell 7\;C:\Program Files (x86)\NetSarang\Xftp 7\;C:\Program Files (x86)\Universal Extractor;C:\Program Files (x86)\Universal Extractor\bin;C:\Program Files\usbipd-win\;C:\Program Files (x86)\ZeroTier\One\;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\NetSarang\Xshell 8\;C:\Program Files\PuTTY\;C:\Program Files (x86)\NetSarang\Xftp 8\;C:\Python311;C:\Program Files\Git\cmd;C:\Program Files\WireGuard\;C:\Users\raylogic_202\AppData\Local\Microsoft\WindowsApps;D:\VSCode\bin;C:\Users\raylogic_202\.dotnet\tools;C:\Users\raylogic_202\AppData\Roaming\npm;C:\Users\raylogic_202\AppData\Local\GitHubDesktop\bin;;D:\espressif-ide-330;
OS: Windows_NT
COMPUTERNAME: MBP-DELL
IDF_PATH: D:/esp-idf-v5.3.X/
CARBON_MEM_DISABLE: 1
PROCESSOR_REVISION: a701
CommonProgramW6432: C:\Program Files\Common Files
ComSpec: C:\WINDOWS\system32\cmd.exe
IDF_MAINTAINER: 1
SystemRoot: C:\WINDOWS
TEMP: C:\Users\RAYLOG~1\AppData\Local\Temp
HOMEDRIVE: C:
USERPROFILE: C:\Users\raylogic_202
TMP: C:\Users\RAYLOG~1\AppData\Local\Temp
CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
NUMBER_OF_PROCESSORS: 16
IDF_PYTHON_ENV_PATH: d:\esp-idf-tools\python_env\idf5.3_py3.11_env
ESP_ROM_ELF_DIR: d:\esp-idf-tools\tools\esp-rom-elfs\20240305\

Operating System: windows 11
Java Runtime Version: 17.0.12+7
Eclipse Version: 4.33.0.v20240903-0240
Eclipse CDT Version: 11.6.1.202406241230
IDF Eclipse Plugin Version: 3.3.0.202503071213
ESP-IDF v5.3.2-dirty
Python set for IDF_PYTHON_ENV: Python 3.11.2

Is this patched in 3.3.0
or is a patch available to to fix it post install ?

Copy link

Hi @MrutyunjayPatel! This is an automated response.
If you don’t find the answer helpful, please check the ESP32 IDE forum (https://www.esp32.com/viewforum.php?f=40) or GitHub issues (https://github.com/espressif/idf-eclipse-plugin/issues) to see if the issue has already been discussed.


Based on the information provided in your issue report, it appears you're experiencing a problem with building and flashing from the terminal monitor in Espressif-IDE 3.3.0. The error message indicates that "cmake" must be available on the PATH when using idf.py commands from the terminal monitor.

Looking at the knowledge sources, I can see that this is related to environment variable configuration in the Espressif-IDE. The issue appears to be that while cmake is installed (as shown in your version output), it's not properly accessible when running commands from the terminal monitor within the IDE.

From the Espressif-IDE documentation, the IDE should handle auto-configuration of the build environment variables. The warning message about IDF_PYTHON_ENV_PATH being missing in environmental variables is likely related to this issue.

There are a few things you can try to resolve this:

  1. Make sure your ESP-IDF and tools installation is properly configured in the IDE. You can check this in the IDE preferences.

  2. Try refreshing your environment variables in the IDE. According to the ESP-IDF Eclipse Plugin documentation, the plugin should handle "Auto-configuration of Eclipse CDT build environment variables such as PATH, IDF_PATH, OPENOCD_SCRIPTS and IDF_PYTHON_ENV_PATH".

  3. Check if there's a conflict between the system PATH and the IDE's internal PATH configuration. Your environment variable dump shows that cmake is installed at d:\esp-idf-tools\tools\cmake\3.30.2\bin, but it might not be properly included in the PATH when the terminal monitor runs commands.

This appears to be an issue with how the terminal monitor in Espressif-IDE 3.3.0 handles environment variables when executing commands. I don't see specific information about a patch for this issue in version 3.3.0 in the provided knowledge sources.

For the most up-to-date information on this specific issue, I recommend checking the GitHub issue you referenced (#1129) for any official responses or workarounds from the Espressif team.

@github-actions github-actions bot changed the title Terminal monitor still cannot build, flash or app flash Terminal monitor still cannot build, flash or app flash (IEP-1509) Apr 15, 2025
@sigmaaa
Copy link
Collaborator

sigmaaa commented Apr 17, 2025

Hi @MrutyunjayPatel,

There's no need to run "idf.py monitor -E" directly from the IDE. You can simply use the ESP-IDF Serial Monitor:

Image

This monitor will open automatically after flashing, as long as the corresponding option is enabled:

Image

If you want to build or flash directly from the monitor, press Ctrl + T to open the command menu. For example:

  • To flash the entire project: Ctrl + T, then Ctrl + F

  • To flash just the app: Ctrl + T, then Ctrl + A (or simply Ctrl + T, then press A)

Let me know if you have any questions!

@sigmaaa sigmaaa self-assigned this Apr 17, 2025
@MrutyunjayPatel
Copy link
Author

MrutyunjayPatel commented Apr 17, 2025

This will flash the whole chip and run the monitor , that's not my concern

i need to do only the app-flash to target during development.

This is likely a ide's terminals environments issue.

from within the terminal the monitor in built feature are effected .

This feature does not work as intended from version 3.0.0 for normal and encrypted projects.
flash and app-flash, encrypted-flash, encrypted -app flash is suppose to work from within the monitor , with Ctrl+F / Ctrl-A we can rebuild the project and flash the app or encrypted-app-flash.

This in built feature is broken in 3.xx for both for the "IDE's IDF-terminal and IDF-Monitor " shortcuts.

we need to use external Desktops IDF terminals console shortcut for development

--- esp_idf_monitor (1.6.0) - ESP-IDF Monitor tool
--- based on miniterm from pySerial
---
--- Ctrl+]   Exit program
--- Ctrl+T   Menu escape key, followed by:
--- Menu keys:
---    Ctrl+T         Send the menu character itself to remote
---    Ctrl+]         Send the exit character itself to remote
---    Ctrl+R         Reset target board via RTS line
---    Ctrl+F         Build & flash project
---    Ctrl+A (or A)  Build & flash app only
---    Ctrl+Y         Toggle output display
---    Ctrl+L         Toggle saving output into file
---    Ctrl+I (or I)  Toggle printing timestamps
---    Ctrl+P         Reset target into bootloader via the DTR/RTS lines
---    Ctrl+X (or X)  Exit program

@sigmaaa
Copy link
Collaborator

sigmaaa commented Apr 17, 2025

Hi @MrutyunjayPatel,

I was able to reproduce the issue "cmake" must be available on the PATH to use idf.py when using the ESP-IDF terminal. However, I'm still a bit confused about what exactly is going wrong when using the same menu option from the ESP-IDF Serial Monitor (as opposed to the ESP-IDF terminal). Could you clarify?

In any case, if the local terminal works for you, you can configure it in Eclipse like this:
Go to:

  • Eclipse → Preferences → Terminal → Local Terminal → Click "Add"

In the window that appears, specify the following:

  • Name: Any name you like, for example esp-idf-terminal

  • Path: similar to C:\Windows\System32\cmd.exe

  • Arguments: /k "C:\path\to\esp-idf\export.bat" (This will initialize the ESP-IDF environment in the terminal.)
    Image

  • After this, right click on the project and select esp-idf-terminal

Image

@MrutyunjayPatel
Copy link
Author

MrutyunjayPatel commented Apr 17, 2025

hi,
But in my IDE this option is locked or not available !!

The Show in local terminal does not show any options at all

@sigmaaa
Copy link
Collaborator

sigmaaa commented Apr 17, 2025

Hi @MrutyunjayPatel,

Apologies — that was my mistake. I was using Eclipse CDT along with our plugin. I’m seeing the same issue with the local terminal on the Espressif-IDE as well, though I’m not sure why it’s occurring now. I’ll investigate further and get back to you shortly.

@sigmaaa
Copy link
Collaborator

sigmaaa commented Apr 17, 2025

Hi @MrutyunjayPatel,

To make local terminals appear in the Espressif IDE, it's necessary to install the TM Terminal dependencies. To do this, follow these steps:

In the Espressif IDE, go to

  • Help → Install New Software...
  • In the "Work with" field, select:
  • CDT - https://download.eclipse.org/tools/cdt/releases/latest
  • Look for Terminal features (under "CDT Optional Features") and check the box next to Terminal or TM Terminal.
  • Click Next, then follow the prompts to install and restart the IDE.

After installation, the Local Terminal option should appear in the terminal view.

@MrutyunjayPatel
Copy link
Author

MrutyunjayPatel commented Apr 17, 2025 via email

@sigmaaa
Copy link
Collaborator

sigmaaa commented Apr 17, 2025

hi,
Thank for looking into this issue,

In my IDE this is in Terminal Features

Image

Thanks and Regards

That's right, you probably need Terminal (console) view, TM Terminal, TM Terminal Control, TM Terminal Local Connector Extensions, but it's safe to install all of them, so you can click on the checkbox Terminal Features.

@MrutyunjayPatel
Copy link
Author

hi,

This is a work around works for me now
had some trouble with windows path with backlash
after setting path with this path for my system

/k "D:\\esp-idf-v5.3.X\\export.bat"

NOTE: the backslash are double for every occurrence in path to the batch file

I can use the monitor terminal with my pre-encrypted projects devices

Thanks a lot for yours effort :)

@MrutyunjayPatel
Copy link
Author

hi sigma,
In the new terminal every thing works as expected (as this is similar to desktop shortcut).

Image

Issue still persists for the IDE 3.3.0 The Terminals drop down options "ESP-IDF Serial Monitor" and "ESP-IDF Terminal"

For IDF-Terminal cmake in path error
when running following command

idf.py -p COM3 monitor -E

--- Running d:\esp-idf-tools\python_env\idf5.3_py3.11_env\Scripts\python.exe D:/esp-idf-v5.3.X/\tools\idf.py -p COM3 encrypted-app-flash...
ESP-IDF v5.3.2-dirty
"cmake" must be available on the PATH to use idf.py
Executing action: encrypted-app-flash
--- Build failed
--- Press Ctrl+] to exit monitor.
--- Press Ctrl+F to build & flash project.
--- Press Ctrl+A to build & flash app.
--- Press any other key to resume monitor (resets target).

For IDF-Serial Monitor for my encrypted projects (development mode encryption)
on pressing press Ctrl-A
it does following
Running d:/esp-idf-tools/python_env/idf5.3_py3.11_env/Scripts/python.exe D:/esp-idf-v5.3.X/tools/idf.py app-flash...
But it should be running encrypted-app-flash for secure project settings.
is their a way to pass -E option to "ESP-IDF Serial Monitor" from terminal drop down option.

@sigmaaa
Copy link
Collaborator

sigmaaa commented Apr 23, 2025

Hi @MrutyunjayPatel,

Thanks for reporting this. As of now, I don't believe there's a way to pass the -E option to the ESP-IDF Serial Monitor directly. However, we could add a field to allow specifying additional options when launching the serial monitor. We'll look into implementing that.

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

No branches or pull requests

2 participants