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)
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)
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