Skip to main content
Associate
March 10, 2026
Solved

Incorrect static library link order in CubeMX generated BLE CMake project for STM32WBA

  • March 10, 2026
  • 1 reply
  • 281 views

Hello,

When generating a basic Bluetooth project for NUCLEO‑WBA55CG using STM32CubeMx 6.17 (and 6.16) with Cmake as the toolchain, the project compilation fails to a missing symbol during the link stage.

Here is the error message:

le_ctrl.c:(.text.HCI_READ_LOCAL_VERSION_INFORMATION+0x20): undefined reference to `ll_sys_get_brief_fw_version'


After investigation, it turns out the issue is caused by the incorrect order of linked static BLE libraries in the generated CMake file "cmake/stm32cubemx/CMakeLists.txt". CubeMX places the Link Layer and BLE Stack libraries in an order that prevents the linker from resolving symbols correctly. Reordering the libraries fixes the issue.


Here is the corrected order that resolves the error:

# Project static libraries
set(MX_LINK_LIBS 
 :stm32wba_ble_stack_basic.a
 :WBA5_LinkLayer_BLE_Basic_lib.a 
 STM32_Drivers
 ${TOOLCHAIN_LINK_LIBRARIES}
 Utilities
	STM32_WPAN
	Common
	
)

 
Best regards

Best answer by Ghofrane GSOURI

Hello @jmk 

Your contribution is much appreciated.

Two tickets  227523 and 226286 have been escalated to dev team to correct this issue.

I will keep you posted with updates.

THX

Ghofrane 

1 reply

Ghofrane GSOURI
Technical Moderator
March 10, 2026

Hello @jmk 

I'm currently checking this behavior. I will get back to you ASAP.

It would be useful if you could provide your IOC to reproduce the issue.

Thx

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
jmkAuthor
Associate
March 10, 2026

@Ghofrane GSOURI, Here is my IOC file.

I'm using cmake version 4.0.2.

Ghofrane GSOURI
Ghofrane GSOURIBest answer
Technical Moderator
March 11, 2026

Hello @jmk 

Your contribution is much appreciated.

Two tickets  227523 and 226286 have been escalated to dev team to correct this issue.

I will keep you posted with updates.

THX

Ghofrane 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.