File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 23
23
import subprocess
24
24
import sys
25
25
26
+ def get_segment_hints ():
27
+ hints = {}
28
+ hints ['IROM' ] = ' - code in flash (default or ICACHE_FLASH_ATTR)'
29
+ hints ['IRAM' ] = ' / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...)'
30
+ hints ['DATA' ] = ') - initialized variables (global, static) in RAM/HEAP'
31
+ hints ['RODATA' ] = ') / 81920 - constants (global, static) in RAM/HEAP'
32
+ hints ['BSS' ] = ') - zeroed variables (global, static) in RAM/HEAP'
33
+ return hints
34
+
26
35
def get_segment_sizes (elf , path ):
27
36
sizes = {}
28
37
sizes ['IROM' ] = 0
@@ -53,10 +62,11 @@ def main():
53
62
54
63
args = parser .parse_args ()
55
64
sizes = get_segment_sizes (args .elf , args .path )
65
+ hints = get_segment_hints ()
56
66
57
67
sys .stderr .write ("Executable segment sizes:" + os .linesep )
58
68
for k in sizes .keys ():
59
- sys .stderr .write ("%-7s: %d%s " % (k , sizes [k ], os .linesep ))
69
+ sys .stderr .write ("%-7s: %-5d %s %s " % (k , sizes [ k ], hints [k ], os .linesep ))
60
70
61
71
return 0
62
72
You can’t perform that action at this time.
0 commit comments