How to overrride defines in from "esp_nimble_cfg.h" ?

sacdal
Posts: 1
Joined: Wed Feb 01, 2023 1:54 pm

How to overrride defines in from "esp_nimble_cfg.h" ?

Postby sacdal » Thu Feb 02, 2023 9:17 am

Hello,

I am developing an BLE Peripheral app with esp32c3 controller and nimble bluetooth stack.
I want to use Device Information Service with some of its characteristics.

These characteristics are enabled by setting the variables such as

Code: Select all

MYNEWT_VAL_BLE_SVC_DIS_FIRMWARE_REVISION_READ_PERM
etc. By default these defines are NULL and The DIS is added without these characteristics.
I read in the nimble documentation that with a newt tool these variables can be set (https://mynewt.apache.org/latest/os/mod ... ynewt_val_)
But this is not possible when nimble is used with esp-idf build system(?)
can someone please tell me how can I define MYNEWT_VAL_* defines in application without modifying the esp-idf files (esp_nimble_cfg.h).

Thank you

irahul
Posts: 36
Joined: Fri Jun 18, 2021 10:07 am

Re: How to overrride defines in from "esp_nimble_cfg.h" ?

Postby irahul » Fri Feb 03, 2023 7:10 am

The syscfg.yml and pkg.yml files that are part of mynewt-nimble system to set /unset a variable are not used "as is" in IDF. As of today, these are not used in IDF . Instead IDF either provides a way to configure few options via menuconfig and uses esp_nimble_cfg.h to have default definations of all the macros.

So, if a macro is defined in esp_nimble_cfg.h and you want to override its value by re-defining it in application, will not work as of today.

Who is online

Users browsing this forum: No registered users and 110 guests