Hello,
I am trying to set up a new project. In this project I need the GPIO driver, UART driver, Bluetooth and WiFi. If I choose a template I can only use one of them at a time.
So how can I activate all the libraries in the project? I tried menuconfig but could not find an option to activate the bt, gpio and uart drivers.
Thank you
Kind regards
Trouble setting up new project
-
- Posts: 7
- Joined: Mon May 06, 2024 9:44 am
Trouble setting up new project
- Attachments
-
- menuconfig.jpg (110.2 KiB) Viewed 1054 times
-
- Posts: 2045
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Trouble setting up new project
Add all components you want to use to the REQUIRES clause in your CMakeLists.txt.
-
- Posts: 7
- Joined: Mon May 06, 2024 9:44 am
Re: Trouble setting up new project
Thanks for the reply.
Is there a list somewhere that tells me what components are available and how to add them to the file?
I looked in the CMakeLists.txt files from example projects where the components are activated but there is no entry, the file is exactly the same as in the project where the components are not available. So are there multiple locatoins where I can add the components?
Is there a list somewhere that tells me what components are available and how to add them to the file?
I looked in the CMakeLists.txt files from example projects where the components are activated but there is no entry, the file is exactly the same as in the project where the components are not available. So are there multiple locatoins where I can add the components?
-
- Posts: 2045
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Trouble setting up new project
Should be in main/CMakeLists.txt, see Build System, or one of the examples.
-
- Posts: 7
- Joined: Mon May 06, 2024 9:44 am
Re: Trouble setting up new project
Thanks for the reply.
It works partially. I could include the uart and gpio drivers. Although I did not find a list of components anywhere.
I did a file search and found some components in the file "project_description.json". That seemd to work for some. I also added the "bt" module. Now I still get errors for
#include "esp_bt_defs.h"
#include "esp_gap_ble_api.h"
#include "esp_bt_main.h"
#include "esp_bt_device.h"
How can I use those?
Also there is no explanation on why the entries from "esp_driver_uart" and "esp_driver_gpio" are missing in CMakeList.txt from sampleprojects that compile just fine although using these components. Are there multiple places where this can be added?
It works partially. I could include the uart and gpio drivers. Although I did not find a list of components anywhere.
I did a file search and found some components in the file "project_description.json". That seemd to work for some. I also added the "bt" module. Now I still get errors for
#include "esp_bt_defs.h"
#include "esp_gap_ble_api.h"
#include "esp_bt_main.h"
#include "esp_bt_device.h"
How can I use those?
Also there is no explanation on why the entries from "esp_driver_uart" and "esp_driver_gpio" are missing in CMakeList.txt from sampleprojects that compile just fine although using these components. Are there multiple places where this can be added?
-
- Posts: 2045
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Trouble setting up new project
All components the ESP-IDF comes with are located/looked for in ${IDF-PATH}/components.
As to the Bluetooth component: Make sure you run idf.py menuconfig and enable/select the Bluetooth stack you want to use (Bluedroid or NimBLE). Also make sure you set the correct IDF_TARGET (classic Bluetooth is only available on the original ESP32; all others only support Bluetooth LE).
As to the Bluetooth component: Make sure you run idf.py menuconfig and enable/select the Bluetooth stack you want to use (Bluedroid or NimBLE). Also make sure you set the correct IDF_TARGET (classic Bluetooth is only available on the original ESP32; all others only support Bluetooth LE).
-
- Posts: 7
- Joined: Mon May 06, 2024 9:44 am
Re: Trouble setting up new project
Thanks a lot, all is running now.
Who is online
Users browsing this forum: Bing [Bot] and 146 guests