These are chat archives for SmingHub/Sming

23rd
Mar 2018
slaff
@slaff
Mar 23 2018 06:21
Hm... I guess you are using absolutely the same SDK and same compiler. My blind guess is that your compiler does not have mforce-l32 support. In that case the http_parser has quite some constants that go in the wrong memory address.
Also when you say the "old Sming" version which is the one that you mean? You can check the travis builds and compare the memory stats there.
slaff
@slaff
Mar 23 2018 06:36
BUT I would be happy if you show memory stats from your application.
Alexander V. Ribchansky
@avr39-ripe
Mar 23 2018 06:57
@slaff where should I get "proper" compiler? I use one thet oooold esp-open-sdk project produce for FreeBSD, can run linux binary compiler also. Please point me to the right one.
slaff
@slaff
Mar 23 2018 06:58
Can you compile that one https://github.com/pfalcon/esp-open-sdk for FreeBSD?
But, as said before, why not dump the memory stats from the two compiled and linked apps, sort the stats by size and compare items?
Alexander V. Ribchansky
@avr39-ripe
Mar 23 2018 07:00
no, I try several times but always something goes wrong... may be I try again.. is there binary build of it for linux? I have old build from linux
ok mem stats you request is that memanalyzer produces after build?
slaff
@slaff
Mar 23 2018 07:01
I can send you my linux build. Just out of curiosity can you use the MacOS build?
Alexander V. Ribchansky
@avr39-ripe
Mar 23 2018 07:01
For freebsd I use esp-alt-sdk, not open as I said :(
no, FreeBSD have linux compatibility, not macos...
slaff
@slaff
Mar 23 2018 07:02
For the mem stats: xtensa-lx106-elf-readelf -s ./out/build/app*.out
Alexander V. Ribchansky
@avr39-ripe
Mar 23 2018 07:03
Oh, great, if you can upload your "proper" compiler somewhere I can try to use it :)
And one very important thing - is you app having its own LD script? If yes - please see the updates that we have added to the Sming LD scripts.
Did you check also this: pfalcon/esp-open-sdk#269
Alexander V. Ribchansky
@avr39-ripe
Mar 23 2018 07:07
I think my app do not use separate LD...
hmm.. good chances that I can build esp-open-sdk...
slaff
@slaff
Mar 23 2018 07:08
Give it a try...
Alexander V. Ribchansky
@avr39-ripe
Mar 23 2018 07:08
hoh thank you @slaf for mak my morning link-full :) will try and post results here
thanks for HELP!!!
my compiler both freebsd ver and old linux binaries DO not support mforce-l32....
do please upload yours somewhere in case I fail to build it under FreeBSD
slaff
@slaff
Mar 23 2018 07:10
do please upload yours somewhere in case I fail to build it under FreeBSD
Give me some minutes...
Alexander V. Ribchansky
@avr39-ripe
Mar 23 2018 07:11
5 is enough? I JOKING!!!! thanks :)
Alexander V. Ribchansky
@avr39-ripe
Mar 23 2018 07:21
@slaff thank a lot!
slaff
@slaff
Mar 23 2018 07:21
You are welcome
Alexander V. Ribchansky
@avr39-ripe
Mar 23 2018 09:10
@slaff at first sight - IT IS AMAZING! :) just changing compiler to yours, rebuild latest Sming + SDK 2.2 + rebuild my app = MUCH MORE free heap and much more stable work.. I'm afraid to believe in miracle... wil test further.. If no further problems arise - I think we should mention somewhere that -mforce-l32 is mandatory compiler feature for recent Sming so people with older compilers do not have head ache :)
slaff
@slaff
Mar 23 2018 09:11
SDK 2.2 is not supported :) . Make sure to flashinit your device if you change sdks
Alexander V. Ribchansky
@avr39-ripe
Mar 23 2018 09:11
but it works :)))
oh.. may be not 2.2... I missed it.. I just set env SDK_BASE so Sming take some SDK ver...
it is indeed not 2.2.. now I see... and what ver of SDK Sming choose?
is there proper way to switch version of SDK that Sming checkouts? or just manually checkout what I want and rebuild Sming?
slaff
@slaff
Mar 23 2018 09:48

get the latest develop version of Sming, rebuild using:

make dist-clean
make

and then use it. By default Sming will use the sdk in the SDK_BASE.

Alexander V. Ribchansky
@avr39-ripe
Mar 23 2018 09:55
@slaff just discover that part functionality of my app just stop work properly while app and sming compiled with -mforce-l32 compiler... recompilt the same smind and app with my old "buggy" compiler and it works again... :( what should I debug in my app or pay attention to or rewrite??
my app GREATLY relay on binary data exchange over websocket.. is mforce-l32 change some byte order by itself?
Alexander V. Ribchansky
@avr39-ripe
Mar 23 2018 12:31
@slaff old programmers always tell DO NOT USE BITMASK! I do not hear their precaution.. In my core class I use one byte to store several bits values inside.. I think mforce-l32 somehow broke good bitmask logic.. will investigate further.. I cant refuse to use bitmask :(
slaff
@slaff
Mar 23 2018 15:18

my app GREATLY relay on binary data exchange over websocket.. is mforce-l32 change some byte order by itself?

That is probably not the case because the variable(s) that you use is/are not a constant(s). As such it is still stored in the old location and I guess you did not use PROGMEM attribute to force it to go to other location.

Alexander V. Ribchansky
@avr39-ripe
Mar 23 2018 16:41
yes, bitmasked variables woeks well at first sight, something wrong is with vector of delegates which is empty while shuldn't be such. will dig deeper in vector magic