esp rainmaker on how to move rainmaker libraries

Hasan12977
Posts: 1
Joined: Tue Jul 02, 2024 6:51 pm

esp rainmaker on how to move rainmaker libraries

Postby Hasan12977 » Mon Aug 26, 2024 4:11 pm

Hello.

I wanted to move rainmaker files/folders to esp-idf components to make my life easier for future projects.

here is the cmakelist.txt content:




# The following lines of boilerplate have to be in your project's CMakeLists
# in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)

if(DEFINED ENV{RMAKER_PATH})
set(RMAKER_PATH $ENV{RMAKER_PATH})
else()
set(RMAKER_PATH ${CMAKE_CURRENT_LIST_DIR}/../..)
endif(DEFINED ENV{RMAKER_PATH})

# Add RainMaker components and other common application components
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components/esp-insights/components
${RMAKER_PATH}/components
${RMAKER_PATH}/examples/common
)

set(PROJECT_VER "1.0")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(temperature_sensor)



as you can see there are components and there is a common folder inside examples folder. I tried to move them to a different folder but I keep getting error saying:

Component directory /Users/Hasan/esp/esp-idf/components/esp-insights does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/Hasan/Desktop/temperture sensor-esp_idf/components/esp-insights does not contain a CMakeLists.txt file. No component will be added

CMake Error at /Users/Hasan/esp/esp-idf/tools/cmake/build.cmake:544 (message):
ERROR: The 'override_path' field in the manifest file
'../../../components/esp-insights/components/esp_insights/idf_component.yml'
does not point to a directory. You can safely remove this field from the
manifest if this project is an example copied from a component repository.
The dependency will be downloaded from the ESP component registry.
Documentation:
https://docs.espressif.com/projects/idf ... rride-path


this error happens when I move common folder from examples folder to rainamker folder(RMAKER_PATH).


how do I move these libraries/components to esp idf components without getting any errors?

ESP_Piyush
Posts: 309
Joined: Wed Feb 20, 2019 7:02 am

Re: esp rainmaker on how to move rainmaker libraries

Postby ESP_Piyush » Tue Aug 27, 2024 7:16 am

Please try the following

- Add esp-rainmaker component dependency in your project using

Code: Select all

idf.py add-dependency "espressif/esp_rainmaker^1.4.0"
- Copy all folders from examples/common into a components/ folder in your project or esp-idf/components.

- Remove this line from your project's CMakeLists.txt

Code: Select all

set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components/esp-insights/components ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common)

Who is online

Users browsing this forum: No registered users and 21 guests