From e44c54c76b612b7240c7f6792fa45e568103421a Mon Sep 17 00:00:00 2001 From: Travis Goodspeed Date: Sat, 18 Nov 2017 13:04:02 -0500 Subject: [PATCH] Corrected RAM sizes and percentages. --- bin/printsizes.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/printsizes.py b/bin/printsizes.py index dbe1db0..d4bcd4a 100755 --- a/bin/printsizes.py +++ b/bin/printsizes.py @@ -31,9 +31,11 @@ def printsizes(stream): datalen=len(data.data()); bss=elffile.get_section_by_name('.bss'); bsslen=len(bss.data()); - dataperc=(datalen+bsslen)*100.0/8192; - print("%d bytes of .data, %d bytes of .bss (%d %%)" - %(datalen,bsslen,dataperc)); + noinit=elffile.get_section_by_name('.noinit'); + noinitlen=len(noinit.data()); + 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: print("WARNING: %d percent of code is used!"%codeperc);