/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/freertos/libfreertos.a(port_common.c.obj):(.literal.main_task+0x14): undefined reference to `app_main'
/home/rehu/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/freertos/libfreertos.a(port_common.c.obj): in function `main_task':
/home/rehu/esp/esp-idf/components/freertos/port/port_common.c:129: undefined reference to `app_main'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
ESP32 使用idf.py build 后,提示 undefined reference to `app_main'
-
- Posts: 290
- Joined: Wed Sep 05, 2018 6:23 am
Re: ESP32 使用idf.py build 后,提示 undefined reference to `app_main'
因为你的应用程序没有提供app_main函数.这是用户程序的入口.请参考idf中的example代码
Who is online
Users browsing this forum: Bing [Bot] and 168 guests