Skip to main content
Dadigno
Associate III
November 28, 2025
Question

STM32WB05KZ Build FLASH overflow

  • November 28, 2025
  • 1 reply
  • 252 views

Hi Community,

I'm trying to build the BLE_TransparentMode example for the NUCLEO-WB05KZ, but I'm getting the following build error:

region 'FLASH' overflowed by 93348 bytes

Dadigno_0-1764347585364.png

 


Steps to reproduce:

  • Open the BLE_TransparentMode example from the MX Example Selector for NUCLEO_WB05KZ.
  • Change the toolchain to CMake with GCC compiler.
  • Open the project and configure it using the STM32 VS Code extension.
  • Build the project → the error appears.

Environment:

STM32CubeMX: v6.16

STM32CubeIDE for VS Code: v3.6.4

Has anyone encountered this issue or knows what might be causing the FLASH overflow with the CMake/GCC configuration?
Thanks!

 

 

1 reply

Andrew Neil
Super User
November 28, 2025

@Dadigno wrote:
  • Open the BLE_TransparentMode example from the MX Example Selector for NUCLEO_WB05KZ.
  • Change the toolchain to CMake with GCC compiler.

Are you sure that the optimisation level is the same in  your modified project?

What happens if you build the example as-is - without any modifications ?

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Dadigno
DadignoAuthor
Associate III
December 1, 2025

Hi,

build runs fine without any modifications, using stm32cubeide.

 


@Andrew Neil wrote:

Are you sure that the optimisation level is the same in  your modified project?

 


I think so, I didn’t change anything else except the compiler and toolchain settings from MX.

 

Andrew Neil
Super User
December 1, 2025

@Dadigno wrote:

I think so


But have you checked?

 


@Dadigno wrote:

I didn’t change anything else except the compiler and toolchain 


Well, the optimisation level is a compiler setting!

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.