cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB05KZV6TR BLE compile issue

drafshin
Associate III

 

Hello STM32 Community,

I’m currently working with an STM32WB05KZV6TR microcontroller and am facing issues after adding the STM32_BLE to my project. I initially configured a BLE peripheral using STM32CubeMX and STM32CubeIDE, and after code is generated, it does not compile. it looks like it can't find the .s file

here are some of the errors:

 

 

C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/thumb/v6-m/nofp/crtn.o: missing .note.GNU-stack section implies executable stack
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/app_entry.o: in function `MX_APPE_Init':
./Core/Src/app_entry.c:102: undefined reference to `HW_RNG_Init'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/app_entry.c:108: undefined reference to `HW_AES_Init'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/app_entry.c:109: undefined reference to `HW_PKA_Init'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/STM32WB0x_HAL_Driver/Src/stm32wb0x_hal_radio_timer.o: in function `HAL_RADIO_TIMER_Init':
./Drivers/STM32WB0x_HAL_Driver/Src/stm32wb0x_hal_radio_timer.c:355: undefined reference to `blue_unit_conversion'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/STM32WB0x_HAL_Driver/Src/stm32wb0x_hal_radio_timer.o: in function `HAL_RADIO_TIMER_MachineTimeToSysTime':
./Drivers/STM32WB0x_HAL_Driver/Src/stm32wb0x_hal_radio_timer.c:860: undefined reference to `blue_unit_conversion'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/STM32WB0x_HAL_Driver/Src/stm32wb0x_hal_radio_timer.o: in function `_configureTxRxDelay':
./Drivers/STM32WB0x_HAL_Driver/Src/stm32wb0x_hal_radio_timer.c:1153: undefined reference to `blue_unit_conversion'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/STM32WB0x_HAL_Driver/Src/stm32wb0x_hal_radio_timer.o: in function `_update_xtal_startup_time':
./Drivers/STM32WB0x_HAL_Driver/Src/stm32wb0x_hal_radio_timer.c:1187: undefined reference to `blue_unit_conversion'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/STM32WB0x_HAL_Driver/Src/stm32wb0x_hal_radio_timer.o: in function `_get_system_time_and_machine':
./Drivers/STM32WB0x_HAL_Driver/Src/stm32wb0x_hal_radio_timer.c:1241: undefined reference to `blue_unit_conversion'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/STM32WB0x_HAL_Driver/Src/stm32wb0x_hal_radio_timer.o:C:/AfshinFiles/Projects/Nultra/Firmware/Nultra/Debug/../Drivers/STM32WB0x_HAL_Driver/Src/stm32wb0x_hal_radio_timer.c:1244: more undefined references to `blue_unit_conversion' follow
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./STM32_BLE/App/app_ble.o: in function `ModulesInit':
./STM32_BLE/App/app_ble.c:198: undefined reference to `PKAMGR_Init'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./STM32_BLE/App/app_ble.o: in function `BLE_Init':
./STM32_BLE/App/app_ble.c:293: undefined reference to `aci_gatt_srv_profile_init'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./STM32_BLE/App/app_ble.c:327: undefined reference to `aci_gap_profile_init'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./STM32_BLE/App/app_ble.c:342: undefined reference to `Gap_profile_set_dev_name'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./STM32_BLE/App/app_ble.c:353: undefined reference to `Gap_profile_set_appearance'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./STM32_BLE/App/app_ble.o: in function `NVM_Process':
./STM32_BLE/App/app_ble.c:462: undefined reference to `NVMDB_Tick'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./STM32_BLE/Target/blenvm.o: in function `BLENVM_Init':
./STM32_BLE/Target/blenvm.c:129: undefined reference to `NVMDB_Init'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./STM32_BLE/Target/blenvm.c:131: undefined reference to `NVMDB_HandleInit'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./STM32_BLE/Target/blenvm.c:132: undefined reference to `NVMDB_HandleInit'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./STM32_BLE/Target/blenvm.o: in function `BLEPLAT_NvmAdd':
./STM32_BLE/Target/blenvm.c:155: undefined reference to `NVMDB_AppendRecord'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./STM32_BLE/Target/blenvm.o: in function `BLEPLAT_NvmGet':
./STM32_BLE/Target/blenvm.c:195: undefined reference to `NVMDB_ReadCurrentRecord'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./STM32_BLE/Target/blenvm.c:201: undefined reference to `NVMDB_HandleInit'
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-ea

 

 

 

The errors highlight multiple undefined references, particularly to blue_unit_conversion and functions like HW_RNG_Init, HW_AES_Init, and PKAMGR_Init, as well as references to several other functions related to BLE and cryptography.

Steps I Took to Resolve:

  1. Tried Adding blue_unit_conversion.s to Assembler: To fix the undefined reference to 'blue_unit_conversion' error, I added the blue_unit_conversion.s file in the assembler section of the project settings.

  2. Encountered New Issue with Reset_Handler: After adding blue_unit_conversion.s, I encountered the following error:

     
    `

 

 

warning: cannot find entry symbol Reset_Handler; defaulting to 10040000​

 

 

  • Can someone provide guidance on resolving the undefined reference errors?
  • Any advice or solutions would be greatly appreciated!

Thank you in advance!

Afshin

20 REPLIES 20

Hello @drafshin 

Happy to know that your issue was solved as expected with the new STM32CubeIDE. This is known and documented issue with the CubeIDE 1.17.0. The solution I provided was just an example on how to compile a code on the tool (STM32CubeIDE V1.17.0) without a compilation issues. I didn’t test if it works or not I just found some work around to make it compile successfully since your original question was about compilation issues and not Connection issues. Welcome to the ST Community for your coming questions. Just don’t forget to make it precise (a post for each new request).

Hope your projects work well.

Best Regards.

STTwo-32

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.