How to include nvs_flash component in custom outbox implementation
Posted: Sat Jul 08, 2023 11:30 am
Hello,
I am new to ESP-IDF and wanted to make a custom outbox implementation for the MQTT client.
I have imported the file as suggested and this is in my main CMakeLists file
this works, however I can't include the nvs_flash.h file in my custom_outbox.c.
I tried using but it didn't work.
Adding nvs_flash to REQUIRES for esp-mqtt component directly in the idf directory works though, I don't know why appending it through CMake instead doesn't work. I would have assumed it does the same thing.
Any help appreciated. I am using ESP-IDF on vscode.
I am new to ESP-IDF and wanted to make a custom outbox implementation for the MQTT client.
I have imported the file as suggested and this is in my main CMakeLists file
Code: Select all
idf_component_get_property(mqtt mqtt COMPONENT_LIB)
set_property(TARGET ${mqtt} PROPERTY SOURCES ${CMAKE_CURRENT_LIST_DIR}/path/custom_outbox.c APPEND)
I tried using
Code: Select all
idf_component_set_property(mqtt REQUIRES nvs_flash APPEND )
Adding nvs_flash to REQUIRES for esp-mqtt component directly in the idf directory works though, I don't know why appending it through CMake instead doesn't work. I would have assumed it does the same thing.
Any help appreciated. I am using ESP-IDF on vscode.