0

我正在尝试构建项目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
4

1 回答 1

0

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

于 2019-11-30T22:23:03.640 回答