Directory Restructure - ESPNOW-example
Posted: Fri Aug 22, 2025 6:54 pm
I am looking to restructure the project to an AUTOSAR formatted version as shown below:
GA_Restructure/
├─ target/ <-- main component
│ ├─ source/
│ │ ├─ GA_main.c <-- contains app_main()
│ │ └─ wifi.c
│ ├─ include/
│ │ └─ wifi.h
│ └─ CMakeLists.txt <-- component CMakeLists
├─ CMakeLists.txt <-- root project CMakeLists
└─ sdkconfig
So I've been having issues with building this. It seems it cannot find app_main.
In the root CMake list I set IDF_MAIN_COMPONENT to look at the target folder.
In the component CMakelist I defined idf_component_register to look at source/GA_main.c for app_main.
GA_Restructure/
├─ target/ <-- main component
│ ├─ source/
│ │ ├─ GA_main.c <-- contains app_main()
│ │ └─ wifi.c
│ ├─ include/
│ │ └─ wifi.h
│ └─ CMakeLists.txt <-- component CMakeLists
├─ CMakeLists.txt <-- root project CMakeLists
└─ sdkconfig
So I've been having issues with building this. It seems it cannot find app_main.
In the root CMake list I set IDF_MAIN_COMPONENT to look at the target folder.
In the component CMakelist I defined idf_component_register to look at source/GA_main.c for app_main.