migrate from 4.2 to 4.4 ,then app_main is undefined reference

lwshowl
Posts: 27
Joined: Sat Jun 05, 2021 7:33 am

migrate from 4.2 to 4.4 ,then app_main is undefined reference

Postby lwshowl » Sat May 28, 2022 11:11 am

used to compile using idf 4.2 , after migrating to idf 4.4 , it gets link errors as follows

/../riscv32-esp-elf/bin/ld.exe: esp-idf/freertos/libfreertos.a(port_common.c.obj): in function `main_task':
H:/Espressif/frameworks/esp-idf-v4.4/components/freertos/port/port_common.c:117: undefined reference to `app_main'

cmakelists.txt
set(SOURCES ./Src/main.cpp
./Src/ringbufferUart.cpp
./Src/app_tasks.cpp
./Src/md5.cpp
./Src/util.cpp
./Src/app_ble.c
./Src/SI522A_interface.c
./Src/SI522A_App.c
./Src/myspi.c)


idf_component_register(SRCS ${SOURCES}
INCLUDE_DIRS "." "Inc"
REQUIRES freertos esp_common nvs_flash bt)

plz help

lwshowl
Posts: 27
Joined: Sat Jun 05, 2021 7:33 am

Re: migrate from 4.2 to 4.4 ,then app_main is undefined reference

Postby lwshowl » Sat May 28, 2022 11:22 am

after changing the folder name that holds the sources to main , it works again

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Majestic-12 [Bot] and 143 guests