
MT-D21E
User Guide
Detailed Memory Usage Output After Compilation
The flash used message at the end of compilation is not correct. The number shown
represents the .text segment only. However, Flash usage = .text + .data segments (RAM
usage = .data + .bss segments). In this release, two programs are run at the end of
compilation to provide more detailed memory usage. To enable this output, go to File
>Preferences and beside "Show verbose output during:", check "compilation".
Just above the normal flash usage message, is the output from the size utility. However, this
output is also incorrect, as it shows .text+.data in the .text field, but 0 in the .data field.
However, the .text field does show the total flash used. The .data field can be determined by
subtracting the value from the normal flash usage message (.text) from the value in the .text
field (.text+.data). The .bss field is correct.
Above the size utility output is the output from the nm utility. The values on the left are in
bytes. The letters stand for: T(t)=.text, D(d)=.data, B(b)=.bss, and everything else (ie: W)
resides in flash (in most cases).
July 11, 2016
20