Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to combine ESP-IDF with ESP Rainmaker components (MEGH-1856) #48

Closed
alexiskyriakou opened this issue Feb 18, 2021 · 8 comments
Closed

Comments

@alexiskyriakou
Copy link

Hello,

does anyone knows how can i combine ESP-idf and ESP Rainmaker components?

i had open GPIO example from Rainmaker directory and add in c_cpp_properties.json the following:

{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/",
"${env:IDF_PATH}/components/
",
"C:/Users/Alexis/esp/esp-rainmaker/components/",
"C:/Users/Alexis/esp/esp-rainmaker/components/esp_rainmaker/include/
",
"C:/Users/Alexis/esp/esp-rainmaker/examples/common/",
"C:/Users/Alexis/esp/esp-idf/components/
",
"C:/Users/Alexis/esp/esp-idf/components/freertos/",
"C:/Users/Alexis/esp/esp-idf/components/freertos/include/freertos/
"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-msvc-x64"
}
],
"version": 4
}

and gives me erros that it can not find stddef.h, limit.h, stdint.h in almost all included files

I am using Visual Studio Code ESP-IDF extension

Thank you
Alexis

@github-actions github-actions bot changed the title how to combine ESP-IDF with ESP Rainmaker components how to combine ESP-IDF with ESP Rainmaker components (MEGH-1856) Feb 18, 2021
@ameyinamdar
Copy link

Hi @alexiskyriakou You don't need to change any file. Once the IDF is configured properly in Espressif VS Code plugin, you can simply open any of the application in esp-rainmaker/examples/ folder and directly compile through VS Code plugin. The asp-rainmaker components are added by the application's CMakelist.txt and other IDF components are added by IDF build system.

@alexiskyriakou
Copy link
Author

alexiskyriakou commented Feb 18, 2021

I believe that idf configured correct in VS code because i can open, bulid and flash examples under esp-idf.

But when i open an example from esp rainmaker, VScode does not recognize the include files..

Both esp-idf and esp rainmaker are under the same folder like:

esp
| -> esp-idf
| -> esp-rainmaker

@ameyinamdar
Copy link

@alexiskyriakou VSCode not recognising the include files is probably just navigation issue. Can you compile the rainmaker example in this configuration? If not, can you please provide the log?

@alexiskyriakou
Copy link
Author

No i can not compile.

Here is the log file for Fan Example CMakeOutput.log

@alexiskyriakou
Copy link
Author

Finally i fixed it... I clone the esp rainmaker repository and now builds flash and monitor rainmaker examples...

@alexiskyriakou
Copy link
Author

i have one more question...

I create a project under EspRainmaker directory and works fine. My question is which is the proper way to move that project under Documents folders ? I want to do this because my Documents folder is sync to cloud for backup purposes

Thank you in advance

@ameyinamdar
Copy link

You need to copy components/ folder from asp-rainmaker and adjust relative paths in application's CMakeLists.txt

# Add RainMaker components and other common application components
set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/../../components ${CMAKE_CURRENT_LIST_DIR}/../common)

@alexiskyriakou
Copy link
Author

Thanks @ameyinamdar its woking now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants