Used memory: what does text/data/bss mean in the project view ?

Q: Ride reports some of the used memory in the project view: text/data/bss, what do these values mean ?

A: They allow you to calculate how much Flash or RAM is used.

  • By default, in standard Flash mode with default linker script, Flash used = text+data, and RAM used = data+bss (plus vectors and possibly and some alignment padding, and maybe some special device-specific reserved regions, and on some devices the startup is put aside, and there are other exceptions).
  • In RAM boot mode, Flash used = data, RAM used = text+data+bss.
  • In RAMonly or external memory mode most customers use a custom linker script, which might have non-contiguous memory regions, reserved areas, etc.which may make it completely different, and completely unpredictable for us.

We could implement some dirty tricks and add a lot of warning messages around the most-of-the-time-wrong report, but this would require instrumenting the linker script, and it would not be compatible with old projects without customer action which means you would have to spend your time making it work.

The percentage of used Flash cannot be extracted automatically from the map file, or any other files at our disposal, so we chose not to interpret the information that we have, and to simply display the basic text/data/bss sizes with which most people are happy.