-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lwip2: lighter implementation #3362
Conversation
@igrr are we waiting until after the next release to merge this, or do we want it in the next release? |
Yes, we're waiting until after the next release. |
Includes two PRs: - igrr/axtls-8266#46 by @earlephilhower: Move debug strings from RAM to Flash - igrr/axtls-8266#50: Fix memory leak in ssl_ext_host_name
Every assert() includes a __FILE__ constant string to RODATA which can be quite large as it includes the complete path as well as the filename. Move that string into PMEM, and update the postmortem to work with either PMEM or RAM strings for dumping abort/assert/exception information.
The ax_port_malloc, ax_port_calloc, ax_port_realloc, and ax_port_free functions in WiFiClientSecure are not actually used by the AXTLS library. It's directly using the library routines, and these function are never used. Remove these dead bits of code to make the axtls operation clearer.
Custom manifest for @platformio which instructs PIO Build System to do not archive library's object files. See - esp8266#3321 (comment) - http://docs.platformio.org/en/latest/librarymanager/config.html#libarchive
UMM debugging strings are normally placed in RODATA, which uses up scarse memory. Move them to PROGMEM and use macros to replace printf with a version that can handle ROM strings.
The extension -> MIME type routine uses lots of constant strings which end up in the RODATA segment of RAM. Refactor the comparison to use a table of strings stored in PMMEM instead, freeing ~370 bytes for the heap.
The Arduino IDE requires the use of a tab separator between the name and identifier. Without this tab the keyword is not highlighted. Reference: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords
The RST spec does not appear to believe in intra-cell line continuation as appeared to be expected by the original author. Widen columns and unbreak words to fix output.
realloc() is called with newSize > 0 (at least 16), so newbuffer==0 means the old memory was not deallocated. Therefore, the pointer should still point to the old buffer. This change should resolve issue esp8266#3516.
ram + flash footprint is now better than with lwip1.4.
|
…t (get it from arduino's sdk lwip1.4)
SoftwareSerial: update to 3.3.1
@igrr @devyte @davisonja At this point, and
What do you think if
|
That sounds very good to me @d-a-v. Let's add it to master to make things
easier in terms of testing and updates.
…On Wed, Nov 1, 2017, 21:01 david gauchard ***@***.***> wrote:
@igrr <https://github.com/igrr> @devyte <https://github.com/devyte>
@davisonja <https://github.com/davisonja> At this point, and
- because people are beginning to be aware that lwip2 can solve some
old issues and some of them already use it,
- because this PR cannot not be merged as-is (gitk shows real tube map
due to repaired mistakes and also to my inability to stay clean in the long
run with git and the multiple branches I'm dealing with - I lost liblwip2.a
the other day, and I regularly lose myself in suddenly appearing
head-detached branch :),
- because this PR is really small (it's one makefile, one line in the
main ldscript, the include directory+lib which are however auto-generated,
and a submodule ref),
- because memory footprint seems equivalent to lwip1.4's,
- because lwip2 needs more serious testing
- because I don't want to and will not advertise my own repo
What do you think if
- I include in here the regenerated boards.txt from #3722
<#3722> so it is tested too
(and has lwip2+debug for all known boards)
- lwip2 is advertised in issues where relevant with an easy
step-by-step setup doc
- and of course I keep up syncing with master so testers can always
have master+lwip2
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3362 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEJcepUlCDfMH_fUCnb5cFNH1lvYb5HAks5syGupgaJpZM4N-Kxb>
.
|
To master, I was not asking for that much :) Did I understand well ? |
Because the ldscripts need to match I would vote to include a generated boards.txt, though in practice since it should look the same as the modified version in this pr its probably just as simple to leave the current one. I've got some queries about the current script, but been tied up with new child, hopefully can post them tonight 😊 |
closing in favour of #3783 |
@d-a-v I did mean master. Since lwip v2 is optional, it shouldn't be any harm, and hopefully will help folks who run into lwip related issues. |
This PR is replaced by #3783
full sources are separate and available as a submodule
included in this PR: include/ and liblwip2.a + Makefile for pull&rebuild
I guess this is the way @igrr imports his cloned axtls, so arduino/esp8266 is lighter.
aside from this lwip2 implementation gets more genericity for other esp8266 projects.