-
• #2
The
scripts/find_big_ram/rom
scripts could be handy here.Afaik
peek/poke
really don't use much. Neither do asm/compiledC since they're basically placeholders and all the heavy lifting is done on the PCDropping Graphics would be a big one if it's not being used.
-
• #3
The scripts/find_big_ram/rom scripts could be handy here.
Good point - thanks
-
• #4
Just added Waveform to the blacklist like this {"class":"Waveform","name":"*"}
compiled
make clean && BLACKLIST=BLACKLIST.json make
and checked with
xtensa-lx106-elf-objdump -d -l -x espruino_esp8266_user1.elf | grep -i Waveform
expected no return, but got about 350 lines back.
Any hint what goes wrong on my site?
402714f0 l O .irom0.text 00000018 jswSymbols_Waveform_proto 4026c650 l O .irom0.text 0000001d jswSymbols_Waveform_proto_str 00000000 l df *ABS* 00000000 jswrap_waveform.c 40242928 l F .irom0.text 0000006b jswrap_waveform_getBuffer 402429c4 l F .irom0.text 000001c5 jswrap_waveform_start 40242d9c g F .irom0.text 000000e6 jswrap_waveform_constructor 40242ef0 g F .irom0.text 0000004e jswrap_waveform_stop 40242e84 g F .irom0.text 00000014 jswrap_waveform_startOutput 40242b98 g F .irom0.text 00000168 jswrap_waveform_idle . . . . . /Espruino/repos/MaBecker/src/jswrap_waveform.c:305 4024c6ca: d90561 l32r a6, 40242ae0 <jswrap_waveform_start+0x11c> 4026c650 <jswSymbols_Waveform_proto_str>: 4026d050: 0079 6157 6576 6f66 6d72 6100 616e 6f6c y.Waveform.analo 4027008c: 6157 6576 6f66 6d72 6320 756f 646c 276e Waveform couldn' 402700ac: 6157 6576 6f66 6d72 6920 2073 6f6e 2074 Waveform is not 40270144: 6157 6576 6f66 6d72 6920 2073 6c61 6572 Waveform is alre 402701d0: 6157 6576 6f66 6d72 6320 756f 646c 276e Waveform couldn'
-
• #5
Wow, there are still many strings that have not been moved to flash in the ESP8266 coding sections.
-
• #6
Question: Are blacklist entries get removed from firmware during ‘make’ or just disabled?
-
• #7
I believe the blacklist entries get removed from
gen/jswrapper.c
(you can check that file easily) - they then won't be referenced and should be optimised out.But I wonder if you're compiling with
RELEASE=1
? If not the optimisations may not happen -
• #8
The scripts/find_big_ram/rom scripts could be handy here.
not output for ESP8266, but there is
make topstrings
andtopreadonly
But I wonder if you're compiling with RELEASE=1? If not the optimisations may not happen
Yes, as
export RELEASE=1
is a part of my default environment ;-)Try a simple BLACKLIST.json
[{"class":"Waveform","name":"*"}]
make clean && BLACKLIST=BLACKLIST.json make
grep -i waveform gen/jswrapper.c
Result:
-
• #9
see attached file
1 Attachment
-
• #11
MaBe,
there is a not fully tested change in py file, to support wildcard.
This change is used today in efeu only.
For now in your environment you could add all functions to blacklist instead of using wildcard
Please add things that can be removed to get more vars and heap
This is an example form JumJum to explain how a blacklist works
exclude high math functions:
[{"class": "E","name": "FFT"}
,{"class": "E","name": "convolve"}
,{"class": "E","name": "interpolate"}
,{"class": "E","name": "interpolate2d"}
,{"class": "E","name": "variance"}
]
or peek and poke stuff
,{"class": "","name": "peek16"}
,{"class": "","name": "peek32"}
,{"class": "","name": "peek8"}
,{"class": "","name": "poke16"}
,{"class": "","name": "poke32"}
,{"class": "","name": "poke8"}
or
,{"class": "E","name": "asm"}
,{"class": "E","name": "compiledC"}
or
.......