ESP-IDF Terminal
This project uses ESP-IDF installed via the Espressif VS Code extension. The ESP-IDF environment is not available in a default shell — you must source a PowerShell profile script first.
Discovering the Environment
- •Read
.vscode/settings.jsonand find theidf.currentSetupvalue — this isIDF_PATH. - •Find the PowerShell profile script by searching for
Microsoft.*PowerShell_profile.ps1under the ESP-IDF tools directory (typicallyC:\Espressif\tools\on Windows).
powershell
# Example: discover the profile script Get-ChildItem -Path "C:\Espressif\tools" -Filter "Microsoft.*PowerShell_profile.ps1" -Recurse | Select -First 1
Running idf.py Commands
Source the discovered PowerShell profile, then run idf.py:
powershell
& '<path-to-PowerShell-profile>'; idf.py <command>
Common Commands
powershell
# Set target chip & '<profile>'; idf.py set-target esp32s3 # Build & '<profile>'; idf.py build # Clean build & '<profile>'; idf.py fullclean # Flash and monitor & '<profile>'; idf.py flash monitor # Open menuconfig & '<profile>'; idf.py menuconfig
Important Notes
- •Always source the profile script before running
idf.py. Theidf.py.exewrapper alone will fail without the full environment. - •Do NOT use
export.batorexport.ps1from the ESP-IDF source tree — they reference a different Python venv path and will fail. - •The working directory must be the project root.
- •Build commands are long-running — use
WaitMsBeforeAsync: 10000and poll withcommand_status. - •Dependencies are managed via
main/idf_component.yml(ESP-IDF Component Manager).