Page 1 of 1

migrate from 4.2 to 4.4 ,then app_main is undefined reference

Posted: Sat May 28, 2022 11:11 am
by lwshowl
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

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

Posted: Sat May 28, 2022 11:22 am
by lwshowl
after changing the folder name that holds the sources to main , it works again