乐鑫技术交流
直播中

张飞雄

7年用户 961经验值
私信 关注
[问答]

按照ESP32-IDF的编程指南操作,运行idf.py menuconfig后,运行报错怎么解决?

请问我按照ESP32-IDF的编程指南操作,下载后esp-idf后,运行idf.py menuconfig后,运行报错,报错信息如下:
Administrator@DE-0011 MINGW64 /d/lin_work/esp32_work/esp/esp-idf/examples/get-started/hello_world (master)
$ idf.py menuconfig
Checking Python dependencies...
Python requirements from D:lin_workesp32_workespesp-idfrequirements.txt are satisfied.
Executing action: menuconfig
Running ninja in directory d:lin_workesp32_workespesp-idfexamplesget-startedhello_worldbuild
Executing "ninja menuconfig"...
[0/1] cmd.exe /C "cd /D D:lin_workesp32_workespesp-idfexamplesget-startedhello_world...output config D:/lin_work/esp32_work/esp/esp-idf/examples/get-started/hello_world/sdkconfig"
D:/lin_work/esp32_work/esp/esp-idf/components/bt/Kconfig:386: undefined variable "$IDF_PATH/components/bt/host/bluedroid/Kconfig.in"
FAILED: CMakeFiles/menuconfig
cmd.exe /C "cd /D D:lin_workesp32_workespesp-idfexamplesget-startedhello_worldbuild && C:Python27python.exe D:/lin_work/esp32_work/esp/esp-idf/tools/kconfig_new/confgen.py --kco
nfig D:/lin_work/esp32_work/esp/esp-idf/Kconfig --config D:/lin_work/esp32_work/esp/esp-idf/examples/get-started/hello_world/sdkconfig --env-file D:/lin_work/esp32_work/esp/esp-idf/exampl
es/get-started/hello_world/build/config.env --env IDF_TARGET=esp32 --output config D:/lin_work/esp32_work/esp/esp-idf/examples/get-started/hello_world/sdkconfig && "C:Program FilesCMake
bincmake.exe" -E env "COMPONENT_KCONFIGS=D:/lin_work/esp32_work/esp/esp-idf/components/app_trace/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/bt/Kconfig D:/lin_work/esp32_work/
esp/esp-idf/components/driver/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/efuse/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/esp-tls/Kconfig D:/lin_work/esp32_work/esp/
esp-idf/components/esp32/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/esp_adc_cal/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/esp_common/Kconfig D:/lin_work/esp32_work/
esp/esp-idf/components/esp_eth/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/esp_event/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/esp_gdbstub/Kconfig D:/lin_work/esp32_
work/esp/esp-idf/components/esp_http_client/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/esp_http_server/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/esp_https_ota/Kconf
ig D:/lin_work/esp32_work/esp/esp-idf/components/esp_https_server/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/esp_wifi/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/espc
oredump/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/fatfs/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/freemodbus/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/
freertos/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/heap/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/libsodium/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/l
og/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/lwip/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/mbedtls/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/mdns/Kcon
fig D:/lin_work/esp32_work/esp/esp-idf/components/mqtt/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/newlib/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/nvs_flash/Kconfig
D:/lin_work/esp32_work/esp/esp-idf/components/openssl/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/pthread/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/spi_flash/Kconfi
g D:/lin_work/esp32_work/esp/esp-idf/components/spiffs/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/tcpip_adapter/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/unity/Kcon
fig D:/lin_work/esp32_work/esp/esp-idf/components/vfs/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/wear_levelling/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/wifi_provi
sioning/Kconfig D:/lin_work/esp32_work/esp/esp-idf/components/wpa_supplicant/Kconfig" "COMPONENT_KCONFIGS_PROJBUILD=D:/lin_work/esp32_work/esp/esp-idf/components/app_update/Kconfig.projbu
ild D:/lin_work/esp32_work/esp/esp-idf/components/bootloader/Kconfig.projbuild D:/lin_work/esp32_work/esp/esp-idf/components/esptool_py/Kconfig.projbuild D:/lin_work/esp32_work/esp/esp-id
f/components/partition_table/Kconfig.projbuild" IDF_CMAKE=y KCONFIG_CONFIG=D:/lin_work/esp32_work/esp/esp-idf/examples/get-started/hello_world/sdkconfig IDF_TARGET=esp32 "C:/Program Files
/Git/usr/bin/winpty.exe" "C:/Program Files/Espressif/ESP-IDF Tools/mconf-idf/mconf-idf.exe" D:/lin_work/esp32_work/esp/esp-idf/Kconfig && C:Python27python.exe D:/lin_work/esp32_work/esp
/esp-idf/tools/kconfig_new/confgen.py --kconfig D:/lin_work/esp32_work/esp/esp-idf/Kconfig --config D:/lin_work/esp32_work/esp/esp-idf/examples/get-started/hello_world/sdkconfig --env-fil
e D:/lin_work/esp32_work/esp/esp-idf/examples/get-started/hello_world/build/config.env --env IDF_TARGET=esp32 --output config D:/lin_work/esp32_work/esp/esp-idf/examples/get-started/hello
_world/sdkconfig"
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
请问这个问题怎样解决呢?按照流程试了很多遍还是报这样错误。
                                                                                                                                                                       

回帖(1)

余温重顾

2024-6-25 16:54:27
在这种情况下,您可以尝试以下方法来解决问题:

1. 将您的工作目录更改为不包含空格或特殊字符的路径。例如,您可以将项目移动到 `D:esp32_workesp-idf` 目录下。

2. 确保您的环境变量设置正确。在 Windows 系统中,您需要设置 `PYTHONPATH` 环境变量,以便正确地找到 Python 依赖项。将 `PYTHONPATH` 设置为 `D:lin_workesp32_workespesp-idf`(或您的实际路径)。

3. 确保您使用的是 Python 3.7 或更高版本。ESP-IDF 需要 Python 3.7 或更高版本才能正常工作。您可以在命令行中运行 `python --version` 来检查您的 Python 版本。



举报

更多回帖

发帖
×
20
完善资料,
赚取积分