5 opendir(DIR
, $codecs) || die "can't opendir $some_dir: $!";
6 my @maps = sort grep { /\.map/ && -f
"$codecs/$_" } readdir(DIR
);
9 print "Codec IRAM IBSS BSS Text \n";
13 my ($iram, $ibss, $bss, $text)=scanmap
($m);
14 printf("%-15s: %5d %5d %6d %6d\n",
15 $m, $iram, $ibss, $bss, $text);
21 open(F
, "<$codecs/$file");
24 if(/[ \t]*0x([0-9a-f]+) *_plugin_start_addr/) {
25 #print "CODEC START: $1\n";
28 elsif(/[ \t]*0x([0-9a-f]+) *plugin_bss_start/) {
29 #print "CODEC BSS START: $1\n";
32 elsif(/[ \t]*0x([0-9a-f]+) *_plugin_end_addr/) {
33 #print "CODEC END: $1\n";
34 $bss = (hex($1) - $codecbss);
35 $codec = (hex($1) - $codec - $bss);
37 elsif(/[ \t]*0x([0-9a-f]+) *iramstart/) {
38 #print "IRAM START: $1\n";
41 elsif(/[ \t]*0x([0-9a-f]+) *iramend/) {
42 #print "IRAM END: $1\n";
43 $iram = (hex($1) - $iram);
45 elsif(/[ \t]*0x([0-9a-f]+) *iedata/) {
46 #print "IBSS START: $1\n";
49 elsif(/[ \t]*0x([0-9a-f]+) *iend/) {
50 #print "IBSS END: $1\n";
51 $ibss = (hex($1) - $ibss);
57 return ($iram, $ibss, $bss, $codec);