esp32s2根据官网入门教程出现编译错误 make[2]: *** No rule to make target '/home/zhoukun/esp/esp-idf/components/esp_wifi/lib/esp32/libco

zhoukuniyc
Posts: 8
Joined: Fri Sep 04, 2020 3:12 am

esp32s2根据官网入门教程出现编译错误 make[2]: *** No rule to make target '/home/zhoukun/esp/esp-idf/components/esp_wifi/lib/esp32/libco

Postby zhoukuniyc » Fri Sep 04, 2020 3:15 am

  1. [ 98%] Building C object esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/libsodium/src/libsodium/sodium/runtime.c.obj
  2. [ 98%] Building C object esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/libsodium/src/libsodium/sodium/version.c.obj
  3. [ 98%] Building C object esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/port/randombytes_esp32.c.obj
  4. [ 98%] Linking CXX static library liblibsodium.a
  5. [ 98%] Built target __idf_libsodium
  6. Scanning dependencies of target __idf_main
  7. [ 98%] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/blink.c.obj
  8. [ 99%] Linking CXX static library libmain.a
  9. [ 99%] Built target __idf_main
  10. Scanning dependencies of target __ldgen_output_esp32.project.ld
  11. [ 99%] Generating ld/esp32.project.ld
  12. [ 99%] Built target __ldgen_output_esp32.project.ld
  13. Scanning dependencies of target blink.elf
  14. make[2]: *** No rule to make target '/home/zhoukun/esp/esp-idf/components/esp_wifi/lib/esp32/libcoexist.a', needed by 'blink.elf'.  Stop.
  15. make[2]: *** Waiting for unfinished jobs....
  16. [ 99%] Building C object CMakeFiles/blink.elf.dir/project_elf_src.c.obj
  17. make[1]: *** [CMakeFiles/Makefile2:2185: CMakeFiles/blink.elf.dir/all] Error 2
  18. make: *** [Makefile:130: all] Error 2
  19. make failed with exit code 2
  20. zhoukun@ubuntu:~/esp/esp-idf/examples/get-started/blink$ idf.py build

所有工程都一样 示例工程编译直接出问题

ESP_morris
Posts: 290
Joined: Wed Sep 05, 2018 6:23 am

Re: esp32s2根据官网入门教程出现编译错误 make[2]: *** No rule to make target '/home/zhoukun/esp/esp-idf/components/esp_wifi/lib/esp32/l

Postby ESP_morris » Fri Sep 04, 2020 8:34 am

在编译前需要先设置目标芯片,idf.py set-target esp32s2
然后再编译烧写idf.py build flash monitor

zhoukuniyc
Posts: 8
Joined: Fri Sep 04, 2020 3:12 am

Re: esp32s2根据官网入门教程出现编译错误 make[2]: *** No rule to make target '/home/zhoukun/esp/esp-idf/components/esp_wifi/lib/esp32/l

Postby zhoukuniyc » Fri Sep 04, 2020 9:11 am

  1. [100%] Generating ld/esp32s2.project.ld
  2. [100%] Built target __ldgen_output_esp32s2.project.ld
  3. Scanning dependencies of target hello-world.elf
  4. 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.
  5. make[3]: *** Waiting for unfinished jobs....
  6. [100%] Building C object CMakeFiles/hello-world.elf.dir/project_elf_src.c.obj
  7. make[2]: *** [CMakeFiles/Makefile2:2271: CMakeFiles/hello-world.elf.dir/all] Error 2
  8. make[1]: *** [CMakeFiles/Makefile2:1977: CMakeFiles/flash.dir/rule] Error 2
  9. make: *** [Makefile:216: flash] Error 2
  10. make failed with exit code 2
设置完是这也的

zhoukuniyc
Posts: 8
Joined: Fri Sep 04, 2020 3:12 am

Re: esp32s2根据官网入门教程出现编译错误 make[2]: *** No rule to make target '/home/zhoukun/esp/esp-idf/components/esp_wifi/lib/esp32/l

Postby zhoukuniyc » Fri Sep 04, 2020 9:13 am

[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 而且会出现下载错误

ESP_morris
Posts: 290
Joined: Wed Sep 05, 2018 6:23 am

Re: esp32s2根据官网入门教程出现编译错误 make[2]: *** No rule to make target '/home/zhoukun/esp/esp-idf/components/esp_wifi/lib/esp32/l

Postby ESP_morris » Wed Sep 09, 2020 8:20 am

对的,如果你想运行esp32-s2,请使用4.2以及之后的IDF。

你能清理一下hello world example下的build目录后再试一下吗
rm -rf build/
你的本地有几个esp-idf的仓库?IDF_PATH是否设置正确?

Who is online

Users browsing this forum: No registered users and 77 guests