ESP32 使用powershell搭建好了环境,执行build编译helloworld例程,报ninja错误
Posted: Sun Mar 26, 2023 3:23 pm
我在windows11上刚配置完esp32编译环境(使用powershell方案),之后进行测试发现编译helloworld例程时报ninja错误;
我的编译环境配置是这样的:
1. git clone esp-idf project
2. git checkout v5.0.1
3. 打开powershell,运行./install.bat
4. 运行 ./export.ps1 导入环境变量
5. 进入helloworld例程目录 相对路径为“esp-idf\examples\get-started\hello_world”
6. 运行 idf.py build之后ninja报错,报错信息如下:
难道在windows上通过powershell命令配置环境,之后会编译不支持吗?这不应该呀
我的编译环境配置是这样的:
1. git clone esp-idf project
2. git checkout v5.0.1
3. 打开powershell,运行./install.bat
4. 运行 ./export.ps1 导入环境变量
5. 进入helloworld例程目录 相对路径为“esp-idf\examples\get-started\hello_world”
6. 运行 idf.py build之后ninja报错,报错信息如下:
Code: Select all
Executing action: all (aliases: build)
Running ninja in directory e:\esp-idf\esp-idf\examples\get-started\hello_world\build
Executing "ninja all"...
ninja: error: 'E:/esp-idf/esp-idf/components/esp_wifi/lib/esp32/libcoexist.a', needed by 'hello_world.elf', missing and no known rule to make it
ninja failed with exit code 1, output of the command is in the e:\esp-idf\esp-idf\examples\get-started\hello_world\build\log\idf_py_stderr_output_7424 and e:\esp-idf\esp-idf\examples\get-started\hello_world\build\log\idf_py_stdout_output_7424
PS E:\esp-idf\esp-idf\examples\get-started\hello_world> idf.py build
Executing action: all (aliases: build)
Running ninja in directory e:\esp-idf\esp-idf\examples\get-started\hello_world\build
Executing "ninja all"...
ninja: error: 'E:/esp-idf/esp-idf/components/esp_wifi/lib/esp32/libcoexist.a', needed by 'hello_world.elf', missing and no known rule to make it
ninja failed with exit code 1, output of the command is in the e:\esp-idf\esp-idf\examples\get-started\hello_world\build\log\idf_py_stderr_output_25140 and e:\esp-idf\esp-idf\examples\get-started\hello_world\build\log\idf_py_stdout_output_25140