【问题标题】:Unable to build project for ESP32无法为 ESP32 构建项目
【发布时间】:2019-11-30 20:40:14
【问题描述】:

我正在尝试构建项目esp-obd-emulator 我总是收到以下错误,也许有人可以帮助我。

我正在使用 esp-idf 构建项目。

C:\Users\edvar\Desktop\esp-idf-2\examples\emu>idf.py build
Checking Python dependencies...
Python requirements from C:\Users\edvar\Desktop\esp-idf-2\requirements.txt are satisfied.
Executing action: all (aliases: build)
Running ninja in directory c:\users\edvar\desktop\esp-idf-2\examples\emu\build
Executing "ninja all"...
[1/5] Performing build step for 'bootloader'
ninja: no work to do.
[2/3] Linking CXX executable emu.elf
FAILED: emu.elf
cmd.exe /C "cd . && C:\Users\edvar\.espressif\tools\xtensa-esp32-elf\esp-2019r2-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe  -mlongcalls -Wno-frame-address  -nostdlib @CMakeFiles\emu.elf.rsp  -o emu.elf  && cd ."
c:/users/edvar/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/esp32/libesp32.a(cpu_start.c.obj):(.literal.main_task+0x18): undefined reference to `app_main'
c:/users/edvar/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/esp32/libesp32.a(cpu_start.c.obj): in function `main_task':
C:/Users/edvar/Desktop/esp-idf-2/components/esp32/cpu_start.c:539: undefined reference to `app_main'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

【问题讨论】:

    标签: esp32 esp-idf


    【解决方案1】:

    esp-obd-emulator 似乎没有被移植到 ESP-IDF 2.0;它似乎仍在使用 Make 而不是 CMake。要么用旧版本的 ESP-IDF 编译它,要么要求它更新到 CMake。

    【讨论】:

      猜你喜欢
      • 2020-11-29
      • 2019-11-28
      • 1970-01-01
      • 1970-01-01
      • 2021-06-10
      • 2021-11-21
      • 2021-05-25
      • 2021-09-11
      • 2019-07-01
      相关资源
      最近更新 更多