cancel
Showing results for 
Search instead for 
Did you mean: 

WBA55 build error: crtn.o missing after following BLE tutorial

Kenwang
Associate III

 

I followed the tutorial from this video: https://www.youtube.com/watch?v=6JPys9B497c to practice setting up BLE.

However, after building the project I encountered the following error:

 

 
crtn.o: missing
C:/ST/STM32CubeIDE_1.19.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: C:/ST/STM32CubeIDE_1.19.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v8-m.main+fp/hard/crtn.o: missing .note.GNU-stack section implies executable stack
C:/ST/STM32CubeIDE_1.19.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: NOTE: This behaviour is deprecated and will be removed in a future version of the linker

The detailed build log is attached. Could you please advise how to fix this issue?

Here are the tool versions I am using:

  • STM32CubeIDE v1.19.0

  • STM32Cube_FW_WBA 1.7.0

  • STM32CubeMX 6.15

2 REPLIES 2
STTwo-32
ST Employee

Hello @Kenwang 

This warning is a known issue in STM32CubeIDE 1.19.x, particularly affecting BLE applications that include certain binary libraries. To resolve this warning, you can explicitly mark the stack as non-executable by adding the linker option -z n -z noexecstack. This option ensures that the stack is treated as non-executable. 

Steps to Apply the Workaround:

  1. Open your STM32CubeIDE project.
  2. Navigate to Project Properties.
  3. Go to C/C++ Build > Settings > Tool Settings > MCU GCC Linker > Miscellaneous.
  4. Add the linker flag -z noexecstack in the Other Flags section.
  5. Save the changes and rebuild your project.

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.

Thanks for your reply.

After adding the flag, the project now compiles successfully. However, after flashing to the NUCLEO-WBA55CG, the ST BLE Toolbox app still cannot detect the device.

From the UART1 log, I only see:

==>> Start Ble_Hci_Gap_Gatt_Init function
Success: aci_hal_write_config_data command - CONFIG_DATA_PUBADDR_OFFSET
Public Bluetooth Address: 00:08:e1:2a:12:34
Success: aci_hal_write_config_data command - CONFIG_DATA_IR_OFFSET
Success: aci_hal_write_config_data command - CONFIG_DATA_ER_OFFSET
Success: aci_hal_set_tx_power_level command
Success: aci_gatt_init command
Success: aci_gap_init command
Success: aci_gatt_update_char_value - Device Name
Success: aci_gatt_update_char_value - Appearance
Success: hci_le_set_default_phy command
Success: aci_gap_set_io_capability command
Success: aci_gap_set_authentication_requirement command
==>> End Ble_Hci_Gap_Gatt_Init function

Is there anything else I should check to make the device discoverable in ST BLE Toolbox?