Page 1 of 1
esp32s2根据官网入门教程出现编译错误 make[2]: *** No rule to make target '/home/zhoukun/esp/esp-idf/components/esp_wifi/lib/esp32/libco
Posted: Fri Sep 04, 2020 3:15 am
by zhoukuniyc
[ 98%] Building C object esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/libsodium/src/libsodium/sodium/runtime.c.obj
[ 98%] Building C object esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/libsodium/src/libsodium/sodium/version.c.obj
[ 98%] Building C object esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/port/randombytes_esp32.c.obj
[ 98%] Linking CXX static library liblibsodium.a
[ 98%] Built target __idf_libsodium
Scanning dependencies of target __idf_main
[ 98%] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/blink.c.obj
[ 99%] Linking CXX static library libmain.a
[ 99%] Built target __idf_main
Scanning dependencies of target __ldgen_output_esp32.project.ld
[ 99%] Generating ld/esp32.project.ld
[ 99%] Built target __ldgen_output_esp32.project.ld
Scanning dependencies of target blink.elf
make[2]: *** No rule to make target '/home/zhoukun/esp/esp-idf/components/esp_wifi/lib/esp32/libcoexist.a', needed by 'blink.elf'. Stop.
make[2]: *** Waiting for unfinished jobs....
[ 99%] Building C object CMakeFiles/blink.elf.dir/project_elf_src.c.obj
make[1]: *** [CMakeFiles/Makefile2:2185: CMakeFiles/blink.elf.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
make failed with exit code 2
zhoukun@ubuntu:~/esp/esp-idf/examples/get-started/blink$ idf.py build
所有工程都一样 示例工程编译直接出问题
Re: esp32s2根据官网入门教程出现编译错误 make[2]: *** No rule to make target '/home/zhoukun/esp/esp-idf/components/esp_wifi/lib/esp32/l
Posted: Fri Sep 04, 2020 8:34 am
by ESP_morris
在编译前需要先设置目标芯片,idf.py set-target esp32s2
然后再编译烧写idf.py build flash monitor
Re: esp32s2根据官网入门教程出现编译错误 make[2]: *** No rule to make target '/home/zhoukun/esp/esp-idf/components/esp_wifi/lib/esp32/l
Posted: Fri Sep 04, 2020 9:11 am
by zhoukuniyc
[100%] Generating ld/esp32s2.project.ld
[100%] Built target __ldgen_output_esp32s2.project.ld
Scanning dependencies of target hello-world.elf
make[3]: *** No rule to make target '/home/zhoukun/esp/esp-idf/components/esp_wifi/lib/esp32s2/libcoexist.a', needed by 'hello-world.elf'. Stop.
make[3]: *** Waiting for unfinished jobs....
[100%] Building C object CMakeFiles/hello-world.elf.dir/project_elf_src.c.obj
make[2]: *** [CMakeFiles/Makefile2:2271: CMakeFiles/hello-world.elf.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1977: CMakeFiles/flash.dir/rule] Error 2
make: *** [Makefile:216: flash] Error 2
make failed with exit code 2
设置完是这也的
Re: esp32s2根据官网入门教程出现编译错误 make[2]: *** No rule to make target '/home/zhoukun/esp/esp-idf/components/esp_wifi/lib/esp32/l
Posted: Fri Sep 04, 2020 9:13 am
by zhoukuniyc
[100%] Generating ld/esp32s2.project.ld
[100%] Built target __ldgen_output_esp32s2.project.ld
Scanning dependencies of target hello-world.elf
make[3]: *** No rule to make target '/home/zhoukun/esp/esp-idf/components/esp_wifi/lib/esp32s2/libcoexist.a', needed by 'hello-world.elf'. Stop.
make[3]: *** Waiting for unfinished jobs....
[100%] Building C object CMakeFiles/hello-world.elf.dir/project_elf_src.c.obj
make[2]: *** [CMakeFiles/Makefile2:2271: CMakeFiles/hello-world.elf.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1977: CMakeFiles/flash.dir/rule] Error 2
make: *** [Makefile:216: flash] Error 2
make failed with exit code 2
设置完是这个错误 所有工程都一样, 我测试了4.1的库 没有问题 master分支clone下来的就是这样 但是4.1的没有esp32s2 只有esp32说
bate 而且会出现下载错误
Re: esp32s2根据官网入门教程出现编译错误 make[2]: *** No rule to make target '/home/zhoukun/esp/esp-idf/components/esp_wifi/lib/esp32/l
Posted: Wed Sep 09, 2020 8:20 am
by ESP_morris
对的,如果你想运行esp32-s2,请使用4.2以及之后的IDF。
你能清理一下hello world example下的build目录后再试一下吗
rm -rf build/
你的本地有几个esp-idf的仓库?IDF_PATH是否设置正确?