2025-12-22 6:15 AM
Dear STM32CubeIDE Support Team,
while analyzing the memory usage of my STM32 project, I noticed a potential inconsistency in how memory units are displayed in STM32CubeIDE.
Both the Build Analyzer and the memory overview label the values as “KB”, but the reported numbers clearly correspond to KiB (1024 bytes) rather than kB (1000 bytes). This behavior matches the output of arm-none-eabi-size, which reports sizes in bytes.
For example:
arm-none-eabi-size reports Flash usage as:
text + data = 64824 + 148 = 64972 bytes
Converted to kB (1000 bytes), this would be:
64.972 kB
However, STM32CubeIDE displays:
64972 / 1024 = 63.45 KiB, while labeling the unit as “KB”
As a result, summing RAM and Flash values only produces consistent results when interpreting the displayed “KB” values as KiB. The current labeling can therefore be confusing, especially when documenting or comparing memory usage.
I have attached two images that illustrate this behavior and show the comparison between arm-none-eabi-size and the STM32CubeIDE memory analysis.
I wanted to report this observation and ask whether the use of the “KB” label is intentional or if a clarification or correction is planned.
Thank you for your time and support.
Best regards,
Hadi Althiab
2026-03-17 2:17 AM - edited 2026-03-18 6:26 AM
The world uses it inconsistently:
In my code I always use KiB for 1024 to avoid ambiguity.
2026-03-18 6:23 AM
"kiB" does not exist. KiB is the right symbol.
And mass storage manufactures use GB/TB because 1 TB SSD sells better than 960 GiB one although its exactly the same unit.
2026-03-18 6:33 AM - edited 2026-03-18 7:32 AM
@gbm wrote:"kiB" does not exist. KiB is the right symbol.
I never knew. In SI a kB has lower case k to distinguish it from Kelvin. In SI all preferences below 106 are lower case. But I guess binary prefix breaks consistency with SI here and instead has internal consistency by making them all upper case.