STM32: Flash vs. SRAM
The .data segment is copied into RAM, but .bss is usually just set to zero and thus does not occupy any flash memory.
Thus the flash size must be &gt;= .text + .rodata + .data bytes.