ESP-IDF v4.1, cpu_start.c:551: undefined reference to `app_main'
Posted: Sat Sep 26, 2020 7:28 am
hi, need help there to understand cause and looking for solution.
The hello_world build under ESP-IDF v4.1 has been done and fine, so we know the build tool chain and setup has been done perfectly.
we has try to build the project ESP32_MP3_Decoder, failed and log shows following
[Codebox]
c:/users/user0/.espressif/tools/xtensa-esp32-elf/esp-2020r2-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/user0/.espressif/tools/xtensa-esp32-elf/esp-2020r2-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/user0/esp/components/esp32/cpu_start.c:551: undefined reference to `app_main'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
[/Codebox]
The project & log is hosted at Github,
https://github.com/xiaolaba/ESP32_MP3_Decoder
appreciate your help.
The hello_world build under ESP-IDF v4.1 has been done and fine, so we know the build tool chain and setup has been done perfectly.
we has try to build the project ESP32_MP3_Decoder, failed and log shows following
[Codebox]
c:/users/user0/.espressif/tools/xtensa-esp32-elf/esp-2020r2-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/user0/.espressif/tools/xtensa-esp32-elf/esp-2020r2-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/user0/esp/components/esp32/cpu_start.c:551: undefined reference to `app_main'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
[/Codebox]
The project & log is hosted at Github,
https://github.com/xiaolaba/ESP32_MP3_Decoder
appreciate your help.