Project structure IDF 3.3 vs IDF4.1 compilation w/ components directory

jubueche
Posts: 32
Joined: Sat Jan 19, 2019 4:03 pm

Project structure IDF 3.3 vs IDF4.1 compilation w/ components directory

Postby jubueche » Sun Dec 01, 2019 8:21 am

Hi,

I have written code some time ago that compiled fine with esp-idf 3.3. I know that for compilation, you just have to create a
components directory and in each component, you need an empty component.mk . In the project dir. you have a CMakeLists.txt with a
content like this

Code: Select all

cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(app-template)
and in the main directory something like

Code: Select all

set(COMPONENT_REQUIRES )
set(COMPONENT_PRIV_REQUIRES )
set(COMPONENT_SRCS "main.cpp")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()
component_compile_definitions(SET_TRUSTED_CERT_IN_SAMPLES)
Now I switched to the 4.1 esp-idf version and during compilation the linker cannot find
the files in my components anymore. Main.cpp fails right on the first include.
But I have read that all components are automatically included if they are in a components directory.
Am I missing something? Do I really need to register every component in the new version? And if so, why?

Best,
Julian


Who is online

Users browsing this forum: No registered users and 82 guests