Trouble setting up new project

derveroonibo
Posts: 7
Joined: Mon May 06, 2024 9:44 am

Trouble setting up new project

Postby derveroonibo » Mon Feb 17, 2025 9:14 am

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
Attachments
menuconfig.jpg
menuconfig.jpg (110.2 KiB) Viewed 1054 times

MicroController
Posts: 2045
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Trouble setting up new project

Postby MicroController » Mon Feb 17, 2025 11:18 am

Add all components you want to use to the REQUIRES clause in your CMakeLists.txt.

derveroonibo
Posts: 7
Joined: Mon May 06, 2024 9:44 am

Re: Trouble setting up new project

Postby derveroonibo » Mon Feb 17, 2025 11:24 am

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?

MicroController
Posts: 2045
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Trouble setting up new project

Postby MicroController » Mon Feb 17, 2025 10:27 pm

Should be in main/CMakeLists.txt, see Build System, or one of the examples.

derveroonibo
Posts: 7
Joined: Mon May 06, 2024 9:44 am

Re: Trouble setting up new project

Postby derveroonibo » Tue Feb 18, 2025 9:54 am

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?

MicroController
Posts: 2045
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Trouble setting up new project

Postby MicroController » Tue Feb 18, 2025 11:56 am

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

derveroonibo
Posts: 7
Joined: Mon May 06, 2024 9:44 am

Re: Trouble setting up new project

Postby derveroonibo » Tue Feb 18, 2025 1:56 pm

Thanks a lot, all is running now.

Who is online

Users browsing this forum: Bing [Bot] and 146 guests