linker error to unknown references in NimBLE source code

smccusk
Posts: 3
Joined: Tue Aug 26, 2025 7:03 am

linker error to unknown references in NimBLE source code

Postby smccusk » Tue Aug 26, 2025 7:26 am

I'm currently in the process of migrating an existing codebase from ESP-IDF 4.4.6 to ESP-IDF 5.4.2. I've followed the migration guides as set out on the Programming Guide.

I'm not able to compile the code currently, the linker is returning errors for undefined references to the following symbols:
ble_store_config_csfcs
ble_store_config_persist_csfcs
ble_store_config_rpa_recs

These all appear to be defined inside preprocessor #if statements, evaluated by the MYNEWT_VAL() macro each with a different macro as its argument:

BLE_STORE_MAX_CSFCS
BLE_STORE_CONFIG_PERSIST
BLE_STORE_MAX_BONDS

I cannot find where these macros are defined anywhere in the sourcecode, and so I presume each of the #if statements is evaluated as 0 and the definition of the symbols is skipped.

Neither can I find reference to these in any documentation, and googling has yielded no clues.

Are BLE_STORE_MAX_CSFCS etc set as parameters in a config somewhere? How do I set these values so that the preprocessor defines the symbols that the linker cannot find?

I've attached the CMake build log and the terminal output.


Thanks!
Attachments
CMakeOutput.txt
(77.75 KiB) Downloaded 22 times
build_log.txt
(50.36 KiB) Downloaded 13 times

irahul
Espressif staff
Espressif staff
Posts: 57
Joined: Fri Jun 18, 2021 10:07 am

Re: linker error to unknown references in NimBLE source code

Postby irahul » Fri Aug 29, 2025 6:13 am

These are configurable from menuconfig. They have some default predefined values ( i.e. it is not 0 )

smccusk
Posts: 3
Joined: Tue Aug 26, 2025 7:03 am

Re: linker error to unknown references in NimBLE source code

Postby smccusk » Mon Sep 01, 2025 5:01 am

These are configurable from menuconfig. They have some default predefined values ( i.e. it is not 0 )
Thanks for your response!

When I use the jump to symbol tool in the menuconfig editor, it returns "no results" for BLE_STORE_MAX_CSFCS, BLE_STORE_CONFIG_PERSIST, or BLE_STORE_MAX_BONDS.

Is it possible that I have to add them in? Or are they stored under a different macro in menuconfig?

Thanks!

irahul
Espressif staff
Espressif staff
Posts: 57
Joined: Fri Jun 18, 2021 10:07 am

Re: linker error to unknown references in NimBLE source code

Postby irahul » Tue Sep 16, 2025 6:11 am

When I use the jump to symbol tool in the menuconfig editor, it returns "no results" for BLE_STORE_MAX_CSFCS, BLE_STORE_CONFIG_PERSIST, or BLE_STORE_MAX_BONDS.
BLE_STORE_MAX_CSFCS and BLE_STORE_MAX_BONDS : Both are driven by menu config macro: BT_NIMBLE_MAX_BONDS
BLE_STORE_CONFIG_PERSIST : Driven by menuconfig macro: BT_NIMBLE_NVS_PERSIST

smccusk
Posts: 3
Joined: Tue Aug 26, 2025 7:03 am

Re: linker error to unknown references in NimBLE source code

Postby smccusk » Thu Sep 18, 2025 6:39 am

BLE_STORE_MAX_CSFCS and BLE_STORE_MAX_BONDS : Both are driven by menu config macro: BT_NIMBLE_MAX_BONDS
BLE_STORE_CONFIG_PERSIST : Driven by menuconfig macro: BT_NIMBLE_NVS_PERSIST
BT_NIMBLE_MAX_BONDS had been changed to 0, so setting that to 1 has fixed the issue and I can compile the code now.
Thanks for your help!

Who is online

Users browsing this forum: Amazon [Bot], PetalBot and 8 guests