Corrected RAM sizes and percentages.

This commit is contained in:
Travis Goodspeed 2017-11-18 13:04:02 -05:00
parent 54730adf2b
commit e44c54c76b

View File

@ -31,9 +31,11 @@ def printsizes(stream):
datalen=len(data.data()); datalen=len(data.data());
bss=elffile.get_section_by_name('.bss'); bss=elffile.get_section_by_name('.bss');
bsslen=len(bss.data()); bsslen=len(bss.data());
dataperc=(datalen+bsslen)*100.0/8192; noinit=elffile.get_section_by_name('.noinit');
print("%d bytes of .data, %d bytes of .bss (%d %%)" noinitlen=len(noinit.data());
%(datalen,bsslen,dataperc)); dataperc=(datalen+bsslen+noinitlen)*100.0/4096;
print("%d bytes of .data, %d bytes of .bss, %d bytes of .noinit (%d %%)"
%(datalen,bsslen,noinitlen,dataperc));
if dataperc>80: if dataperc>80:
print("WARNING: %d percent of code is used!"%codeperc); print("WARNING: %d percent of code is used!"%codeperc);