Skip to content

Commit

Permalink
lwip2 integration
Browse files Browse the repository at this point in the history
  • Loading branch information
d-a-v authored and igrr committed Nov 3, 2017
1 parent 5c01841 commit 32f6826
Show file tree
Hide file tree
Showing 6 changed files with 2,533 additions and 1,380 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lwip2"]
path = tools/sdk/lwip2/builder
url = https://github.com/d-a-v/esp82xx-nonos-linklayer.git
3,899 changes: 2,520 additions & 1,379 deletions boards.txt

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra

build.lwip_lib=-llwip_gcc
build.lwip_include=lwip/include
build.lwip_flags=-DLWIP_OPEN_SRC

compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/
compiler.sdk.path={runtime.platform.path}/tools/sdk
compiler.libc.path={runtime.platform.path}/tools/sdk/libc/xtensa-lx106-elf
compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/lwip/include" "-I{compiler.libc.path}/include" "-I{build.path}/core"
compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/{build.lwip_include}" "-I{compiler.libc.path}/include" "-I{build.path}/core"

compiler.c.cmd=xtensa-lx106-elf-gcc
compiler.c.flags=-c {compiler.warning_flags} -Os -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -std=gnu99 -ffunction-sections -fdata-sections
Expand Down
1 change: 1 addition & 0 deletions tools/sdk/ld/eagle.app.v6.common.ld
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ SECTIONS
*libstdc++.a:(.literal .text .literal.* .text.*)
*liblwip_gcc.a:(.literal .text .literal.* .text.*)
*liblwip_src.a:(.literal .text .literal.* .text.*)
*liblwip2.a:(.literal .text .literal.* .text.*)
*libaxtls.a:(.literal .text .literal.* .text.*)
*libat.a:(.literal.* .text.*)
*libcrypto.a:(.literal.* .text.*)
Expand Down
6 changes: 6 additions & 0 deletions tools/sdk/lwip2/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

all install clean: builder/Makefile.arduino
make -C builder -f Makefile.arduino $@

builder/Makefile.arduino:
git submodule update --init --recursive builder
1 change: 1 addition & 0 deletions tools/sdk/lwip2/builder
Submodule builder added at 9b6966

8 comments on commit 32f6826

@reaper7
Copy link
Contributor

@reaper7 reaper7 commented on 32f6826 Nov 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for what reason default uploading speed for wemos d1 mini has been reduced from 921600 to 115200?
I switch between boards/modules many time, and changing additional parameter (in this case upload speed) is an unnecessary waste of time.

@d-a-v
Copy link
Collaborator Author

@d-a-v d-a-v commented on 32f6826 Nov 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, this is annoying. I was not aware of that. I'll check with the old boards.txt and try to modify the generator script #3722 to match the old behaviour. In the meantime you can try and (backup board.txt and) move the .menu.UploadSpeed.921600= entries before the others (for all your boards).

@reaper7
Copy link
Contributor

@reaper7 reaper7 commented on 32f6826 Nov 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll be waiting :)
tnx!
P.S. I also remember that default flash size settings was 4/3SPIFFS (currently is 4/1SPIFFS)

@hallard
Copy link
Contributor

@hallard hallard commented on 32f6826 Nov 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guys,
That's not the only problem, why the Wemos D1 R2 Mini board definition has also been changed from

d1_mini.build.board=ESP8266_WEMOS_D1MINI

to

d1_mini.build.board=ESP8266_WEMOS_D1R2MINI

The board name on arduino IDE has not changed so and I just spend too much time to understand why I was missing features on my sketch.
Of course if conditional compilation symbols have changed this can't works.

Is there any reason of that or do I need to change all my github repo to reflect this unattended change?
Any chance to revert back?

@d-a-v
Copy link
Collaborator Author

@d-a-v d-a-v commented on 32f6826 Nov 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry I can't find where your b1_mini comes from.
Can you check your local repo with

git diff remotes/origin/master

For the record, the line you are refering to in this commit is this.
In current master it is this (probably the same),
in the latest generated file I proposed elsewhere to fix other bugs it is there,
and in the generator script, the board name is specified there.
I use this board every day, and it is never hand-written.

@hallard
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry my fault, mistyping of course it's d1_mini not b1, corrected in the issue.
yes the commit you refered here is the one which changed ESP8266_WEMOS_D1MINI to ESP8266_WEMOS_D1R2MINI

@d-a-v
Copy link
Collaborator Author

@d-a-v d-a-v commented on 32f6826 Nov 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right saying this should not have been changed,
so I'm going to revert this back in the generator.
I will soon make a PR for boards.txt only because of this and other mistakes which are currently in master.

edit: Please check #3722

@hallard
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@d-a-v
Thank you very much ;-)

Please sign in to comment.